{"version":3,"file":"static/js/vendors~main.chunk.js","sources":["D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@amityco/js-sdk/build/client.min.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/arrayWithHoles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/assertThisInitialized.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/classCallCheck.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/createClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/defineProperty.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/createClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/defineProperty.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/extends.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/inherits.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/toArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/typeof.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/extends.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/inheritsLoose.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/interopRequireDefault.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/nonIterableRest.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/setPrototypeOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/slicedToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/typeof.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","D:/a/1/s/sites/src/components/core/accordion/Accordion.tsx","D:/a/1/s/sites/node_modules/style-inject/dist/style-inject.es.js","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/annual-report.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/appointments.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/aromatherapy.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/awards.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/baby.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/back-and-neck.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/bath.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/blood-bag.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/camera.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/chat-visit.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/classes-and-events.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/covid-19-faq.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/covid-19-mask.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/covid-19-microscope.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/covid-19-thermometer.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/covid-19-vaccine.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/dna.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/doctor.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/donate.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/emergent-patient-transfer.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/evisit.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/flu-vaccine.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/for-hips.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/for-knees.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/heart.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/information.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/insurance.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/jacket.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/location.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/mask.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/meet-our-team.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/mom-and-baby.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/money.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/mybsw.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/nurse-and-baby.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/palliative-care.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/parents.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/pills.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/podcast.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/proxy.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/pulse.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/quality.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/rattler.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/referral.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/resource.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/ribbon.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/schedule.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/scissors.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/social-support.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/spiritual-support.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/sports-medicine.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/strengthening.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/stretch.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/support-groups.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/symbol.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/target.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/tools-and-resources.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/video-visit.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/volunteer.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/walk-in.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/warning.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/water.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/well-being.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/brand/x-ray.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/account.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/alert.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/aqc.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/area-code.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/arrow-45.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/arrow-down.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/arrow.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/atm.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/attachment.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/bag.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/blog.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/bswh-symbol.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/building.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/calendar.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/camera.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/car.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chat.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/check.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chevron-down.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chevron-left.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chevron-right.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chevron-up.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/chip.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/clipboard.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/clock.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/covid-19.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/credentials.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/credit-card.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/dining-options.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/directions.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/docs-folder.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/dot.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/download.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/edit.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/ellipsis.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/exclamation.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/expand.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/facebook.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/favorite-filled.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/favorite.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/find-care.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/globe.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/grid.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/hamburger.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/help-center.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/help.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/help2.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/information.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/instagram.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/insurance.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/linkedin.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/location.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/logout.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/mask.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/medical.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/medications.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/message-notification.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/message.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/minimize.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/minus.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/money.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/multilingual.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/mute.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/my-location.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/new-patient.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/no-patient.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/parking.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/patient.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/pause.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/phone.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/pinterest.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/play.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/plus.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/post-office.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/prescription.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/printer.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/proxy.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/question.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/recent-search.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/resource.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/results.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/search-doctors.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/search-locations.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/search-medical-records.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/search.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/secure.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/security.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/service.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/settings.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/share.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/sort-order.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/sort.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/star.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/tab-chip.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/testing.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/text-reminders.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/twitter.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/unmute.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/vaccine.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/video-visit.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/visibility-off.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/visibility-on.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/visitor-lounge.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/wallet.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/weather.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/x.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/components/system/youtube.tsx","D:/a/1/s/sites/src/components/foundation/icons/Icon.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/GeneratedBrandIcon.tsx","D:/a/1/s/sites/src/components/foundation/icons/generated/GeneratedSystemIcon.tsx","D:/a/1/s/sites/src/themes/appearance/dark.ts","D:/a/1/s/sites/src/themes/appearance/light.ts","D:/a/1/s/sites/src/themes/ThemeProvider.tsx","D:/a/1/s/sites/src/components/foundation/typography/Typography.tsx","D:/a/1/s/sites/src/components/core/button/ButtonErrors.ts","D:/a/1/s/sites/src/utils/DesignSystemError.ts","D:/a/1/s/sites/src/components/core/button/Button.tsx","D:/a/1/s/sites/src/components/core/divider/Divider.tsx","D:/a/1/s/sites/src/components/core/tooltip/Tooltip.tsx","D:/a/1/s/sites/MyBSWHealth3/node_modules/tslib/tslib.es6.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lottie-web/build/player/lottie.js","D:/a/1/s/sites/MyBSWHealth3/src/Player.tsx","D:/a/1/s/sites/MyBSWHealth3/node_modules/style-inject/dist/style-inject.es.js","D:/a/1/s/sites/MyBSWHealth3/src/ColorPicker.tsx","D:/a/1/s/sites/MyBSWHealth3/src/Popover.tsx","D:/a/1/s/sites/MyBSWHealth3/src/Seeker.tsx","D:/a/1/s/sites/MyBSWHealth3/src/Controls.tsx","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/Button/Button.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/Button/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/ButtonBase/Ripple.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/ButtonBase/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/Fade/Fade.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/Fade/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/blue.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/common.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/green.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/grey.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/indigo.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/orange.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/pink.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/colors/red.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/colorManipulator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createBreakpoints.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createMixins.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createPalette.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createSpacing.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/createTypography.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/defaultTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/shadows.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/shape.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/transitions.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/useTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/withStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/styles/zIndex.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/transitions/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/capitalize.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/deprecatedPropType.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/setRef.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/useEventCallback.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/useForkRef.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/ServerStyleSheets/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/StylesProvider/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/ThemeProvider/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/ThemeProvider/nested.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/createGenerateClassName/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/createStyles/createStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/createStyles/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/getStylesCreator/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/getThemeProps/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/jssPreset/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/makeStyles/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/mergeClasses/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/styled/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/styled/styled.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/useTheme/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/useTheme/useTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/withStyles/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/withStyles/withStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/withTheme/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/styles/esm/withTheme/withTheme.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/borders.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/breakpoints.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/compose.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/display.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/flexbox.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/grid.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/memoize.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/merge.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/palette.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/positions.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/responsivePropType.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/shadows.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/sizing.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/spacing.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/style.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/styleFunctionSx.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/system/esm/typography.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/HTMLElementType.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/chainPropTypes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/deepmerge.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/elementAcceptingRef.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/exactProp.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/getDisplayName.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/ponyfillGlobal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@material-ui/core/node_modules/@material-ui/utils/esm/refType.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/AnalyticsPlugin.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PageViewManager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PageViewPerformanceManager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PageVisitTimeManager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Timing.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/__DynamicConstants.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/EnvelopeCreator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/InternalConstants.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Offline.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/SendBuffer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Sender.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Serializer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Sample.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/HashCodeScoreGenerator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/SamplingScoreGenerator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ConnectionStringParser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Constants.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DomHelperFuncs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Enums.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/HelperFuncs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ContextTagKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/SeverityLevel.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/IConfig.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PartAExtensions.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/RequestResponseHeaders.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/StorageHelperFuncs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Data.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DataPoint.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DataSanitizer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Envelope.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Event.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Exception.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Metric.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PageView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PageViewPerformance.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/RemoteDependencyData.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Trace.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/TelemetryItemCreator.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/UrlHelperFuncs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Util.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/applicationinsights-common.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/EnumHelperFuncs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/EventsDiscardedReason.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/LoggingEnums.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/IChannelControls.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/AppInsightsCore.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/BaseCore.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/BaseTelemetryPlugin.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ChannelController.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/CookieMgr.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/CoreUtils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DataCacheHelper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DbgExtensionUtils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/DiagnosticLogger.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/EnvUtils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/EventHelpers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/InstrumentHooks.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/NotificationManager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PerfManager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ProcessTelemetryContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/RandomHelper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/TelemetryHelpers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/TelemetryInitializerPlugin.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/UnloadHandlerContainer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/W3cTraceParent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/applicationinsights-core-js.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ajax.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ajaxRecord.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/applicationinsights-dependencies-js.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Application.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Device.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Internal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Location.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Session.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/TelemetryTrace.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/User.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/PropertiesPlugin.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/TelemetryContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/applicationinsights-properties-js.js","D:/a/1/s/sites/MyBSWHealth3/src/Constants.ts","D:/a/1/s/sites/MyBSWHealth3/src/Helpers.ts","D:/a/1/s/sites/MyBSWHealth3/src/TsLibGlobals.ts","D:/a/1/s/sites/MyBSWHealth3/src/TsLibShims.ts","D:/a/1/s/sites/MyBSWHealth3/src/applicationinsights-shims.ts","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ApplicationInsightsContainer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ApplicationInsightsDeprecated.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/Initialization.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/applicationinsights-web.js","D:/a/1/s/sites/out/lib/src/DynamicProto.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/utils/safeThis.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/createPopper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/contains.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/enums.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/arrow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/flip.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/hide.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/offset.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/popper-lite.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/popper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/computeOffsets.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/debounce.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/detectOverflow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/format.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getAltAxis.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/getVariation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/math.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/mergeByName.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/orderModifiers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/uniqueBy.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/userAgent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/validateModifiers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@popperjs/core/lib/utils/within.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/core/dist/io-40341e1a.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/core/dist/redux-saga-effects.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/deferred/dist/redux-saga-deferred.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/delay-p/dist/redux-saga-delay-p.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/is/dist/redux-saga-is.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/@redux-saga/symbols/dist/redux-saga-symbols.esm.js","D:/a/1/s/sites/lib/AudioInputTest.ts","D:/a/1/s/sites/lib/AudioOutputTest.ts","D:/a/1/s/sites/lib/MediaConnectionBitrateTest.ts","D:/a/1/s/sites/lib/VideoInputTest.ts","D:/a/1/s/sites/lib/constants.ts","D:/a/1/s/sites/lib/diagnostics.ts","D:/a/1/s/lib/errors/AlreadyStoppedError.ts","D:/a/1/s/lib/errors/DiagnosticError.ts","D:/a/1/s/lib/errors/InvalidOptionsError.ts","D:/a/1/s/lib/errors/InvalidStateError.ts","D:/a/1/s/lib/errors/UnsupportedError.ts","D:/a/1/s/lib/errors/index.ts","D:/a/1/s/lib/polyfills/Audio.ts","D:/a/1/s/lib/polyfills/AudioContext.ts","D:/a/1/s/lib/polyfills/enumerateDevices.ts","D:/a/1/s/lib/polyfills/getUserMedia.ts","D:/a/1/s/lib/polyfills/index.ts","D:/a/1/s/lib/recorder/audio.ts","D:/a/1/lib/recorder/encoder/index.ts","D:/a/1/lib/recorder/encoder/worker.ts","D:/a/1/s/lib/utils/candidate.ts","D:/a/1/s/lib/utils/optionValidation.ts","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ansi-regex/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/base64-js/index.js","D:/a/1/s/sites/js/src/util.js","D:/a/1/s/sites/js/src/alert.js","D:/a/1/s/sites/js/src/button.js","D:/a/1/s/sites/js/src/carousel.js","D:/a/1/s/sites/js/src/collapse.js","D:/a/1/s/sites/node_modules/popper.js/dist/esm/popper.js","D:/a/1/s/sites/js/src/dropdown.js","D:/a/1/s/sites/js/src/modal.js","D:/a/1/s/sites/js/src/tools/sanitizer.js","D:/a/1/s/sites/js/src/tooltip.js","D:/a/1/s/sites/js/src/popover.js","D:/a/1/s/sites/js/src/scrollspy.js","D:/a/1/s/sites/js/src/tab.js","D:/a/1/s/sites/js/src/toast.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/call-bind/callBound.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/call-bind/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/classnames/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/clsx/dist/clsx.m.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/consolidated-events/lib/index.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/cookies-js/dist/cookies.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/a-callable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/an-object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/array-includes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/array-slice.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/classof-raw.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/copy-constructor-properties.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/create-non-enumerable-property.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/create-property-descriptor.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/define-built-in-accessor.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/define-built-in.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/define-global-property.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/descriptors.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/document-create-element.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/engine-is-ios.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/engine-is-node.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/engine-user-agent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/engine-v8-version.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/enum-bug-keys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/export.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/fails.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-apply.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-bind-context.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-bind-native.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-call.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-name.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/function-uncurry-this.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/get-built-in.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/get-method.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/global.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/has-own-property.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/hidden-keys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/html.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/ie8-dom-define.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/indexed-object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/inspect-source.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/internal-state.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-callable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-forced.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-null-or-undefined.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-pure.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/is-symbol.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/length-of-array-like.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/make-built-in.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/math-trunc.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-define-property.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-get-own-property-descriptor.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-get-own-property-names.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-get-own-property-symbols.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-is-prototype-of.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-keys-internal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/object-property-is-enumerable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/ordinary-to-primitive.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/own-keys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/regexp-flags.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/require-object-coercible.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/shared-key.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/shared-store.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/shared.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/symbol-constructor-detection.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/task.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-absolute-index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-indexed-object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-integer-or-infinity.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-length.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-primitive.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/to-property-key.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/try-to-string.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/uid.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/use-symbol-as-uid.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/v8-prototype-define-bug.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/validate-arguments-length.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/weak-map-basic-detection.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/internals/well-known-symbol.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/modules/es.regexp.flags.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/modules/web.clear-immediate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/modules/web.immediate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/core-js/modules/web.set-immediate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/aes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/cipher-core.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/core.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/enc-base64.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/enc-base64url.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/enc-utf16.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/evpkdf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/format-hex.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/hmac.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/lib-typedarrays.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/md5.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/mode-cfb.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/mode-ctr-gladman.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/mode-ctr.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/mode-ecb.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/mode-ofb.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pad-ansix923.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pad-iso10126.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pad-iso97971.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pad-nopadding.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pad-zeropadding.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/pbkdf2.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/rabbit-legacy.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/rabbit.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/rc4.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/ripemd160.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha1.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha224.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha256.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha3.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha384.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/sha512.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/tripledes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/crypto-js/x64-core.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/css-vendor/dist/css-vendor.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/_lib/formatDistance/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/_lib/formatLong/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/_lib/formatRelative/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/_lib/localize/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/_lib/match/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/date-fns/esm/locale/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/deep-equal/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/deepmerge/dist/cjs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/define-properties/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-helpers/esm/addClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-helpers/esm/hasClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-helpers/esm/removeClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-scroll-into-view/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/dom-scroll-into-view/lib/util.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/enquire.js/src/MediaQuery.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/enquire.js/src/MediaQueryDispatch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/enquire.js/src/QueryHandler.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/enquire.js/src/Util.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/enquire.js/src/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/events/events.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/fflate/esm/browser.js","D:/a/1/s/sites/MyBSWHealth3/src/FileSaver.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/function-bind/implementation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/function-bind/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/functions-have-names/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/get-intrinsic/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/GoogleApiComponent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/Circle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/HeatMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/InfoWindow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/Marker.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/Polygon.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/Polyline.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/components/Rectangle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/GoogleApi.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/ScriptCache.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/String.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/areBoundsEqual.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/arePathsEqual.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/cancelablePromise.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/google-maps-react/dist/lib/windowOrGlobal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/gud/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/has-property-descriptors/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/has-symbols/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/has-symbols/shams.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/has-tostringtag/shams.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/has/src/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/history/esm/history.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/hoist-non-react-statics/node_modules/react-is/index.js","D:/a/1/s/sites/MyBSWHealth3/src/parse-tag.js","D:/a/1/s/sites/MyBSWHealth3/src/parse.js","D:/a/1/s/sites/MyBSWHealth3/src/stringify.js","D:/a/1/s/sites/MyBSWHealth3/src/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/hyphenate-style-name/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/i18next/dist/esm/i18next.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/defaults.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/pipeline/build.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/pipeline/format.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/pipeline/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/pipeline/validate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/schema/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/fold-line.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/format-date.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/format-duration.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/format-text.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-alarm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-contact.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-description.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-geolocation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-location.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-organizer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ics/dist/utils/set-summary.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ieee754/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/inherits/inherits_browser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/inputmask/dist/inputmask/global/window.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/inputmask/dist/inputmask/inputmask.date.extensions.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/inputmask/dist/inputmask/inputmask.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ip-range-check/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/ipaddr.js/lib/ipaddr.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/is-arguments/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/is-date-object/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/is-in-browser/dist/module.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/is-regex/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/isarray/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jquery/dist/jquery.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/json2mq/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/globalObject.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/console.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/FileSaver.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/rgbcolor.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/md5.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/AtobBtoa.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/rc4.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/pdfsecurity.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/pdfname.js","D:/a/1/s/sites/MyBSWHealth3/src/jspdf.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/acroform.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/fontFace.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/addimage.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/annotations.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/arabic.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/autoprint.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/canvas.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/cell.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/context2d.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/filters.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/fileloading.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/html.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/javascript.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/outline.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/jpeg_support.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/png.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/omggif.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/JPEGEncoder.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/BMPDecoder.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/WebPDecoder.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/png_support.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/gif_support.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/bmp_support.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/webp_support.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/rgba_support.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/setlanguage.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/split_text_to_size.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/standard_fonts_metrics.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/ttfsupport.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/svg.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/total_pages.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/viewerpreferences.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/xmp_metadata.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/utf8.js","D:/a/1/s/sites/MyBSWHealth3/src/modules/vfs.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/bidiEngine.js","D:/a/1/s/sites/MyBSWHealth3/src/libs/ttffont.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/jss/dist/jss.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/load-script/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash.debounce/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_DataView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Hash.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_ListCache.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Map.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_MapCache.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Promise.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Set.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_SetCache.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Stack.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Symbol.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_Uint8Array.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_WeakMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayEach.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayFilter.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayLikeKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayPush.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arrayReduce.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_arraySome.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_asciiToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_asciiWords.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_assignValue.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_assocIndexOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseAssign.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseAssignIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseAssignValue.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseClone.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseCreate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseFor.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseForOwn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseGet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseGetAllKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseGetTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseHasIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsArguments.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsEqual.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsEqualDeep.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsMatch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsNative.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIsTypedArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseIteratee.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseKeysIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseMatches.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseMatchesProperty.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseProperty.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_basePropertyDeep.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_basePropertyOf.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseSlice.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseTimes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseToString.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_baseUnary.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cacheHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_castPath.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_castSlice.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneArrayBuffer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneBuffer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneDataView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneRegExp.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneSymbol.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_cloneTypedArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_copyArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_copyObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_copySymbols.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_copySymbolsIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_coreJsData.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_createBaseFor.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_createCaseFirst.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_createCompounder.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_deburrLetter.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_defineProperty.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_equalArrays.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_equalByTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_equalObjects.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_freeGlobal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getAllKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getAllKeysIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getMapData.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getMatchData.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getNative.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getPrototype.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getRawTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getSymbols.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getSymbolsIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_getValue.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hasPath.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hasUnicode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hasUnicodeWord.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hashClear.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hashDelete.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hashGet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hashHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_hashSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_initCloneArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_initCloneByTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_initCloneObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isIndex.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isKey.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isKeyable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isMasked.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isPrototype.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_isStrictComparable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_listCacheClear.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_listCacheDelete.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_listCacheGet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_listCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_listCacheSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapCacheClear.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapCacheDelete.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapCacheGet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapCacheSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_mapToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_matchesStrictComparable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_memoizeCapped.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_nativeCreate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_nativeKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_nativeKeysIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_nodeUtil.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_objectToString.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_overArg.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_root.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_setCacheAdd.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_setCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_setToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stackClear.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stackDelete.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stackGet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stackHas.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stackSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stringToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_stringToPath.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_toKey.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_toSource.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_unicodeToArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/_unicodeWords.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/camelCase.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/capitalize.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/cloneDeep.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/deburr.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/eq.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/get.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/has.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/hasIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/identity.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isArguments.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isArrayLike.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isBuffer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isFunction.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isLength.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isMap.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isObjectLike.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isSymbol.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/isTypedArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/keys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/keysIn.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/lodash.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/mapKeys.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/mapValues.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/memoize.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/property.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/snakeCase.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/stubArray.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/stubFalse.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/toString.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/uniqueId.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/upperFirst.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/lodash/words.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/memoize-one/dist/memoize-one.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/moment-timezone/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/moment-timezone/moment-timezone.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/moment/moment.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/nanoclone/src/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/nanoid/index.browser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/nanoid/url-alphabet/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/buffer/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/isarray/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/punycode/punycode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/node-libs-browser/node_modules/util/util.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-assign/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-is/implementation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-is/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-is/polyfill.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-is/shim.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-keys/implementation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-keys/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/object-keys/isArguments.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/paginator/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/path-to-regexp/index.js","D:/a/1/s/sites/src/utils/isBrowser.js","D:/a/1/s/sites/src/utils/debounce.js","D:/a/1/s/sites/src/utils/isFunction.js","D:/a/1/s/sites/src/utils/getStyleComputedProperty.js","D:/a/1/s/sites/src/utils/getParentNode.js","D:/a/1/s/sites/src/utils/getScrollParent.js","D:/a/1/s/sites/src/utils/getReferenceNode.js","D:/a/1/s/sites/src/utils/isIE.js","D:/a/1/s/sites/src/utils/getOffsetParent.js","D:/a/1/s/sites/src/utils/isOffsetContainer.js","D:/a/1/s/sites/src/utils/getRoot.js","D:/a/1/s/sites/src/utils/findCommonOffsetParent.js","D:/a/1/s/sites/src/utils/getScroll.js","D:/a/1/s/sites/src/utils/includeScroll.js","D:/a/1/s/sites/src/utils/getBordersSize.js","D:/a/1/s/sites/src/utils/getWindowSizes.js","D:/a/1/s/sites/src/utils/getClientRect.js","D:/a/1/s/sites/src/utils/getBoundingClientRect.js","D:/a/1/s/sites/src/utils/getOffsetRectRelativeToArbitraryNode.js","D:/a/1/s/sites/src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","D:/a/1/s/sites/src/utils/isFixed.js","D:/a/1/s/sites/src/utils/getFixedPositionOffsetParent.js","D:/a/1/s/sites/src/utils/getBoundaries.js","D:/a/1/s/sites/src/utils/computeAutoPlacement.js","D:/a/1/s/sites/src/utils/getReferenceOffsets.js","D:/a/1/s/sites/src/utils/getOuterSizes.js","D:/a/1/s/sites/src/utils/getOppositePlacement.js","D:/a/1/s/sites/src/utils/getPopperOffsets.js","D:/a/1/s/sites/src/utils/find.js","D:/a/1/s/sites/src/utils/findIndex.js","D:/a/1/s/sites/src/utils/runModifiers.js","D:/a/1/s/sites/src/methods/update.js","D:/a/1/s/sites/src/utils/isModifierEnabled.js","D:/a/1/s/sites/src/utils/getSupportedPropertyName.js","D:/a/1/s/sites/src/methods/destroy.js","D:/a/1/s/sites/src/utils/getWindow.js","D:/a/1/s/sites/src/utils/setupEventListeners.js","D:/a/1/s/sites/src/methods/enableEventListeners.js","D:/a/1/s/sites/src/utils/removeEventListeners.js","D:/a/1/s/sites/src/methods/disableEventListeners.js","D:/a/1/s/sites/src/utils/isNumeric.js","D:/a/1/s/sites/src/utils/setStyles.js","D:/a/1/s/sites/src/utils/setAttributes.js","D:/a/1/s/sites/src/modifiers/applyStyle.js","D:/a/1/s/sites/src/utils/getRoundedOffsets.js","D:/a/1/s/sites/src/modifiers/computeStyle.js","D:/a/1/s/sites/src/utils/isModifierRequired.js","D:/a/1/s/sites/src/modifiers/arrow.js","D:/a/1/s/sites/src/utils/getOppositeVariation.js","D:/a/1/s/sites/src/methods/placements.js","D:/a/1/s/sites/src/utils/clockwise.js","D:/a/1/s/sites/src/modifiers/flip.js","D:/a/1/s/sites/src/modifiers/keepTogether.js","D:/a/1/s/sites/src/modifiers/offset.js","D:/a/1/s/sites/src/modifiers/preventOverflow.js","D:/a/1/s/sites/src/modifiers/shift.js","D:/a/1/s/sites/src/modifiers/hide.js","D:/a/1/s/sites/src/modifiers/inner.js","D:/a/1/s/sites/src/modifiers/index.js","D:/a/1/s/sites/src/methods/defaults.js","D:/a/1/s/sites/src/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/process/browser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/checkPropTypes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/factoryWithTypeCheckers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/lib/ReactPropTypesSecret.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/lib/has.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/prop-types/node_modules/react-is/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/property-expr/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/query-string/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/querystring-es3/decode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/querystring-es3/encode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/querystring-es3/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-autocomplete/build/lib/Autocomplete.js","D:/a/1/s/sites/MyBSWHealth3/src/hook/index.tsx","D:/a/1/s/sites/MyBSWHealth3/src/component/index.tsx","D:/a/1/s/sites/MyBSWHealth3/src/constants.ts","D:/a/1/s/sites/MyBSWHealth3/src/Path.tsx","D:/a/1/s/sites/MyBSWHealth3/src/CircularProgressbar.tsx","D:/a/1/s/sites/MyBSWHealth3/src/CircularProgressbarWithChildren.tsx","D:/a/1/s/sites/MyBSWHealth3/src/buildStyles.ts","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-day-picker/DayPicker/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-day-picker/DayPickerInput/index.js","D:/a/1/s/sites/MyBSWHealth3/src/Caption.js","D:/a/1/s/sites/MyBSWHealth3/src/DateUtils.js","D:/a/1/s/sites/MyBSWHealth3/src/Day.js","D:/a/1/s/sites/MyBSWHealth3/src/DayPicker.js","D:/a/1/s/sites/MyBSWHealth3/src/DayPickerInput.js","D:/a/1/s/sites/MyBSWHealth3/src/Helpers.js","D:/a/1/s/sites/MyBSWHealth3/src/LocaleUtils.js","D:/a/1/s/sites/MyBSWHealth3/src/ModifiersUtils.js","D:/a/1/s/sites/MyBSWHealth3/src/Month.js","D:/a/1/s/sites/MyBSWHealth3/src/Navbar.js","D:/a/1/s/sites/MyBSWHealth3/src/Weekday.js","D:/a/1/s/sites/MyBSWHealth3/src/Weekdays.js","D:/a/1/s/sites/src/addons/MomentLocaleUtils.js","D:/a/1/s/sites/MyBSWHealth3/src/classNames.js","D:/a/1/s/sites/MyBSWHealth3/src/keys.js","D:/webpack/universalModuleDefinition","D:/webpack/bootstrap ad04ceedbfe1663a194a","D:/external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","D:/react-day-picker.min.js","D:/src/DateUtils.js","D:/src/keys.js","D:/src/classNames.js","D:/src/Helpers.js","D:/src/LocaleUtils.js","D:/src/ModifiersUtils.js","D:/src/DayPicker.js","D:/src/umd.js","D:/src/Caption.js","D:/src/Navbar.js","D:/src/Month.js","D:/src/Weekdays.js","D:/src/Day.js","D:/src/Weekday.js","D:/src/DayPickerInput.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-day-picker/moment/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dev-utils/formatWebpackMessages.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dev-utils/launchEditorEndpoint.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dev-utils/node_modules/strip-ansi/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dev-utils/refreshOverlayInterop.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dev-utils/webpackHotDevClient.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dom/cjs/react-dom-server.browser.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dom/cjs/react-dom.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dom/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-dom/server.browser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-error-overlay/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-fast-compare/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/I18nextProvider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/Trans.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/Translation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/context.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/unescape.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/useSSR.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/useTranslation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/withSSR.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-i18next/dist/es/withTranslation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-iframe/dist/es/iframe.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-is/cjs/react-is.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-is/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-js-pagination/dist/Page.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-js-pagination/dist/Pagination.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-number-format/dist/react-number-format.es.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/universalModuleDefinition","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/react_components/BreakView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/react_components/PageView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/react_components/PaginationBoxView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/react_components/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/react_components/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/node_modules/prop-types/factoryWithThrowingShims.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/node_modules/prop-types/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/node_modules/prop-types/lib/ReactPropTypesSecret.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/external umd {\"root\":\"React\",\"amd\":\"react\",\"commonjs\":\"react\",\"commonjs2\":\"react\"}","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/bootstrap","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/runtime/compat get default export","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/runtime/define property getters","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/runtime/harmony module decorator","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/runtime/make namespace object","D:/a/1/s/sites/MyBSWHealth3/ClientApp/ReactPaginate/webpack/startup","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-places-autocomplete/dist/PlacesAutocomplete.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-places-autocomplete/dist/helpers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-places-autocomplete/dist/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-places-autocomplete/dist/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/Player.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/Preview.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/ReactPlayer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/patterns.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/DailyMotion.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Facebook.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/FilePlayer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Kaltura.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Mixcloud.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/SoundCloud.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Streamable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Twitch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Vidyard.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Vimeo.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/Wistia.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/YouTube.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/players/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/props.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-player/lib/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/Manager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/Popper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/Reference.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/usePopper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-popper/lib/esm/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/components/Context.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/components/Provider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/components/connectAdvanced.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/connect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/mapDispatchToProps.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/mapStateToProps.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/mergeProps.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/selectorFactory.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/verifySubselectors.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/connect/wrapMapToProps.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/exports.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/hooks/useDispatch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/hooks/useReduxContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/hooks/useSelector.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/hooks/useStore.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/Subscription.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/batch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/bindActionCreators.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/isPlainObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/reactBatchedUpdates.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/shallowEqual.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/verifyPlainObject.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-redux/es/utils/warning.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-refresh/cjs/react-refresh-runtime.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-refresh/runtime.js","D:/a/1/s/sites/MyBSWHealth3/modules/BrowserRouter.js","D:/a/1/s/sites/MyBSWHealth3/modules/HashRouter.js","D:/a/1/s/sites/MyBSWHealth3/modules/utils/locationUtils.js","D:/a/1/s/sites/MyBSWHealth3/modules/Link.js","D:/a/1/s/sites/MyBSWHealth3/modules/NavLink.js","D:/a/1/s/sites/MyBSWHealth3/modules/createNamedContext.js","D:/a/1/s/sites/MyBSWHealth3/modules/HistoryContext.js","D:/a/1/s/sites/MyBSWHealth3/modules/RouterContext.js","D:/a/1/s/sites/MyBSWHealth3/modules/Router.js","D:/a/1/s/sites/MyBSWHealth3/modules/MemoryRouter.js","D:/a/1/s/sites/MyBSWHealth3/modules/Lifecycle.js","D:/a/1/s/sites/MyBSWHealth3/modules/Prompt.js","D:/a/1/s/sites/MyBSWHealth3/modules/generatePath.js","D:/a/1/s/sites/MyBSWHealth3/modules/Redirect.js","D:/a/1/s/sites/MyBSWHealth3/modules/matchPath.js","D:/a/1/s/sites/MyBSWHealth3/modules/Route.js","D:/a/1/s/sites/MyBSWHealth3/modules/StaticRouter.js","D:/a/1/s/sites/MyBSWHealth3/modules/Switch.js","D:/a/1/s/sites/MyBSWHealth3/modules/withRouter.js","D:/a/1/s/sites/MyBSWHealth3/modules/hooks.js","D:/a/1/s/sites/MyBSWHealth3/modules/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-router/node_modules/mini-create-react-context/dist/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-router/node_modules/react-is/cjs/react-is.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-router/node_modules/react-is/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/arrows.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/default-props.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/dots.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/initial-state.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/inner-slider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/slider.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/track.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-slick/lib/utils/innerSliderUtils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-star-ratings/build/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-star-ratings/build/star-ratings.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-star-ratings/build/star.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/CSSTransition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/ReplaceTransition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/SwitchTransition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/Transition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/TransitionGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/TransitionGroupContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/config.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/utils/ChildMapping.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/utils/PropTypes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-transition-group/esm/utils/reflow.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-waypoint/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-waypoint/node_modules/react-is/cjs/react-is.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react-waypoint/node_modules/react-is/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react/cjs/react-jsx-dev-runtime.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react/cjs/react.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/react/jsx-dev-runtime.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap-scrollspy/lib/inView.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap-scrollspy/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap-scrollspy/lib/scrollspy.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap-scrollspy/lib/scrollspyContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap-scrollspy/lib/scrollspyNavLink.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Alert.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Badge.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Breadcrumb.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/BreadcrumbItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Button.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ButtonDropdown.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ButtonGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ButtonToggle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ButtonToolbar.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Card.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardBody.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardColumns.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardDeck.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardFooter.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardHeader.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardImg.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardImgOverlay.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardLink.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardSubtitle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardText.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CardTitle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Carousel.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CarouselCaption.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CarouselControl.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CarouselIndicators.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CarouselItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Col.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Collapse.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Container.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CustomFileInput.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/CustomInput.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Dropdown.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/DropdownContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/DropdownItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/DropdownMenu.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/DropdownToggle.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Fade.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Form.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/FormFeedback.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/FormGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/FormText.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Input.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/InputGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/InputGroupAddon.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/InputGroupButtonDropdown.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/InputGroupText.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Jumbotron.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Label.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/List.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ListGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ListGroupItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ListGroupItemHeading.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ListGroupItemText.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ListInlineItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Media.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Modal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ModalBody.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ModalFooter.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ModalHeader.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Nav.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/NavItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/NavLink.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Navbar.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/NavbarBrand.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/NavbarText.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/NavbarToggler.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Pagination.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PaginationItem.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PaginationLink.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Popover.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PopoverBody.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PopoverHeader.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PopperContent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/PopperTargetHelper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Portal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Progress.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Row.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Spinner.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/TabContent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/TabContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/TabPane.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Table.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Toast.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ToastBody.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/ToastHeader.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/Tooltip.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/TooltipPopoverWrapper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledAlert.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledButtonDropdown.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledCarousel.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledCollapse.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledDropdown.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledPopover.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/UncontrolledTooltip.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/polyfill.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/es/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/dom-helpers/class/addClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/dom-helpers/class/hasClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/dom-helpers/class/removeClass.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/lib/esm/Manager.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/lib/esm/Popper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/lib/esm/Reference.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/lib/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/lib/esm/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/node_modules/@hypnosphi/create-react-context/lib/implementation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-popper/node_modules/@hypnosphi/create-react-context/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/CSSTransition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/ReplaceTransition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/Transition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/TransitionGroup.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/TransitionGroupContext.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/utils/ChildMapping.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/reactstrap/node_modules/react-transition-group/utils/PropTypes.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist-cookie-storage/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist-cookie-storage/src/node-cookies-wrapper.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist-cookie-storage/src/redux-persist-cookie-storage.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/constants.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/createMigrate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/createPersistoid.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/createTransform.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/getStoredState.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/integration/react.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/persistCombineReducers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/persistReducer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/persistStore.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/purgeStoredState.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/lib/storage/createWebStorage.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/lib/storage/getStorage.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-persist/lib/storage/session.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-saga/dist/redux-saga-core-npm-proxy.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/redux/es/redux.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/regexp-quote/regexp-quote.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/regexp.prototype.flags/implementation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/regexp.prototype.flags/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/regexp.prototype.flags/polyfill.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/regexp.prototype.flags/shim.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/resolve-pathname/esm/resolve-pathname.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/safe-buffer/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/node_modules/domelementtype/lib/esm/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/node_modules/entities/lib/decode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/node_modules/entities/lib/encode.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/dom-serializer/node_modules/entities/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domelementtype/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domhandler/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domhandler/lib/element.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domhandler/lib/node.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/helpers.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/legacy.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/manipulation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/querying.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/stringify.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/domutils/lib/traversal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/entities/lib/decode_codepoint.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/CollectingHandler.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/FeedHandler.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/Parser.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/ProxyHandler.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/Stream.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/Tokenizer.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/WritableStream.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/sanitize-html-react/node_modules/htmlparser2/lib/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/scheduler/cjs/scheduler-tracing.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/scheduler/cjs/scheduler.development.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/scheduler/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/scheduler/tracing.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/setimmediate/setImmediate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/strict-uri-encode/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/string-convert/camel2hyphen.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/timers-browserify/main.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/tiny-invariant/dist/tiny-invariant.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/tiny-warning/dist/tiny-warning.esm.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/toposort/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/tslib/tslib.es6.js","D:/a/1/s/sites/MyBSWHealth3/lib/cancelableroompromise.js","D:/a/1/s/sites/MyBSWHealth3/lib/connect.js","D:/a/1/s/sites/MyBSWHealth3/lib/createlocaltrack.js","D:/a/1/s/sites/MyBSWHealth3/lib/createlocaltracks.ts","D:/a/1/s/sites/lib/data/receiver.js","D:/a/1/s/sites/lib/data/sender.js","D:/a/1/s/sites/lib/data/transceiver.js","D:/a/1/s/sites/lib/data/transport.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/twilio-video/es5/dynamicImport.js","D:/a/1/s/sites/MyBSWHealth3/lib/encodingparameters.js","D:/a/1/s/sites/MyBSWHealth3/lib/eventemitter.js","D:/a/1/s/sites/MyBSWHealth3/lib/index.ts","D:/a/1/s/sites/MyBSWHealth3/lib/localparticipant.js","D:/a/1/s/lib/media/track/audiotrack.js","D:/a/1/lib/media/track/es5/index.js","D:/a/1/lib/media/track/es5/localaudiotrack.js","D:/a/1/lib/media/track/es5/localdatatrack.js","D:/a/1/lib/media/track/es5/localvideotrack.js","D:/a/1/s/lib/media/track/index.js","D:/a/1/s/lib/media/track/localaudiotrack.js","D:/a/1/s/lib/media/track/localaudiotrackpublication.js","D:/a/1/s/lib/media/track/localdatatrack.js","D:/a/1/s/lib/media/track/localdatatrackpublication.js","D:/a/1/s/lib/media/track/localmediatrack.js","D:/a/1/s/lib/media/track/localtrackpublication.js","D:/a/1/s/lib/media/track/localvideotrack.js","D:/a/1/s/lib/media/track/localvideotrackpublication.js","D:/a/1/s/lib/media/track/mediatrack.js","D:/a/1/s/lib/media/track/noisecancellationimpl.ts","D:/a/1/s/lib/media/track/receiver.js","D:/a/1/s/lib/media/track/remoteaudiotrack.js","D:/a/1/s/lib/media/track/remoteaudiotrackpublication.js","D:/a/1/s/lib/media/track/remotedatatrack.js","D:/a/1/s/lib/media/track/remotedatatrackpublication.js","D:/a/1/s/lib/media/track/remotemediatrack.js","D:/a/1/s/lib/media/track/remotetrackpublication.js","D:/a/1/s/lib/media/track/remotevideotrack.js","D:/a/1/s/lib/media/track/remotevideotrackpublication.js","D:/a/1/s/lib/media/track/sender.js","D:/a/1/s/lib/media/track/trackpublication.js","D:/a/1/s/lib/media/track/transceiver.js","D:/a/1/s/lib/media/track/videoprocessoreventobserver.js","D:/a/1/s/lib/media/track/videotrack.js","D:/a/1/s/sites/MyBSWHealth3/lib/networkqualityconfiguration.js","D:/a/1/s/sites/MyBSWHealth3/lib/noisecancellationadapter.ts","D:/a/1/s/sites/MyBSWHealth3/lib/participant.js","D:/a/1/s/sites/lib/preflight/getCombinedConnectionStats.ts","D:/a/1/s/sites/lib/preflight/getturncredentials.ts","D:/a/1/s/sites/lib/preflight/makestat.ts","D:/a/1/s/sites/lib/preflight/mos.ts","D:/a/1/s/sites/lib/preflight/preflighttest.ts","D:/a/1/s/sites/lib/preflight/syntheticaudio.ts","D:/a/1/s/sites/lib/preflight/syntheticvideo.ts","D:/a/1/s/sites/lib/preflight/timer.ts","D:/a/1/s/sites/MyBSWHealth3/lib/queueingeventemitter.js","D:/a/1/s/sites/MyBSWHealth3/lib/remoteparticipant.js","D:/a/1/s/sites/MyBSWHealth3/lib/room.js","D:/a/1/s/sites/lib/signaling/index.js","D:/a/1/s/sites/lib/signaling/localparticipant.js","D:/a/1/s/sites/lib/signaling/localtrackpublication.js","D:/a/1/s/sites/lib/signaling/participant.js","D:/a/1/s/sites/lib/signaling/recording.js","D:/a/1/s/sites/lib/signaling/remoteparticipant.js","D:/a/1/s/sites/lib/signaling/remotetrackpublication.js","D:/a/1/s/sites/lib/signaling/room.js","D:/a/1/s/sites/lib/signaling/track.js","D:/a/1/s/lib/signaling/v2/cancelableroomsignalingpromise.js","D:/a/1/s/lib/signaling/v2/dominantspeakersignaling.js","D:/a/1/s/lib/signaling/v2/icebox.js","D:/a/1/s/lib/signaling/v2/iceconnectionmonitor.js","D:/a/1/s/lib/signaling/v2/index.js","D:/a/1/s/lib/signaling/v2/localparticipant.js","D:/a/1/s/lib/signaling/v2/localtrackpublication.js","D:/a/1/s/lib/signaling/v2/mediasignaling.js","D:/a/1/s/lib/signaling/v2/networkqualitymonitor.js","D:/a/1/s/lib/signaling/v2/networkqualitysignaling.js","D:/a/1/s/lib/signaling/v2/peerconnection.js","D:/a/1/s/lib/signaling/v2/peerconnectionmanager.js","D:/a/1/s/lib/signaling/v2/publisherhintsignaling.js","D:/a/1/s/lib/signaling/v2/recording.js","D:/a/1/s/lib/signaling/v2/remoteparticipant.js","D:/a/1/s/lib/signaling/v2/remotetrackpublication.js","D:/a/1/s/lib/signaling/v2/renderhintssignaling.js","D:/a/1/s/lib/signaling/v2/room.js","D:/a/1/s/lib/signaling/v2/trackprioritysignaling.js","D:/a/1/s/lib/signaling/v2/trackswitchoffsignaling.js","D:/a/1/s/lib/signaling/v2/twilioconnectiontransport.js","D:/a/1/s/sites/MyBSWHealth3/lib/statemachine.js","D:/a/1/s/sites/lib/stats/average.js","D:/a/1/s/sites/lib/stats/icereport.js","D:/a/1/s/sites/lib/stats/icereportfactory.js","D:/a/1/s/sites/lib/stats/localaudiotrackstats.js","D:/a/1/s/sites/lib/stats/localtrackstats.js","D:/a/1/s/sites/lib/stats/localvideotrackstats.js","D:/a/1/s/sites/lib/stats/networkqualityaudiostats.js","D:/a/1/s/sites/lib/stats/networkqualitybandwidthstats.js","D:/a/1/s/sites/lib/stats/networkqualityfractionloststats.js","D:/a/1/s/sites/lib/stats/networkqualitylatencystats.js","D:/a/1/s/sites/lib/stats/networkqualitymediastats.js","D:/a/1/s/sites/lib/stats/networkqualityrecvstats.js","D:/a/1/s/sites/lib/stats/networkqualitysendorrecvstats.js","D:/a/1/s/sites/lib/stats/networkqualitysendstats.js","D:/a/1/s/sites/lib/stats/networkqualitystats.js","D:/a/1/s/sites/lib/stats/networkqualityvideostats.js","D:/a/1/s/sites/lib/stats/peerconnectionreport.js","D:/a/1/s/sites/lib/stats/peerconnectionreportfactory.js","D:/a/1/s/sites/lib/stats/receiverreport.js","D:/a/1/s/sites/lib/stats/receiverreportfactory.js","D:/a/1/s/sites/lib/stats/remoteaudiotrackstats.js","D:/a/1/s/sites/lib/stats/remotetrackstats.js","D:/a/1/s/sites/lib/stats/remotevideotrackstats.js","D:/a/1/s/sites/lib/stats/senderorreceiverreport.js","D:/a/1/s/sites/lib/stats/senderorreceiverreportfactory.js","D:/a/1/s/sites/lib/stats/senderreport.js","D:/a/1/s/sites/lib/stats/senderreportfactory.js","D:/a/1/s/sites/lib/stats/statsreport.js","D:/a/1/s/sites/lib/stats/sum.js","D:/a/1/s/sites/lib/stats/trackstats.js","D:/a/1/s/sites/MyBSWHealth3/lib/transceiver.js","D:/a/1/s/sites/MyBSWHealth3/lib/twilioconnection.js","D:/a/1/s/sites/lib/util/asyncvar.js","D:/a/1/s/sites/lib/util/backoff.js","D:/a/1/s/sites/lib/util/browserdetection.js","D:/a/1/s/sites/lib/util/cancelablepromise.js","D:/a/1/s/sites/lib/util/constants.js","D:/a/1/s/sites/lib/util/detectsilentaudio.js","D:/a/1/s/sites/lib/util/detectsilentvideo.js","D:/a/1/s/sites/lib/util/documentvisibilitymonitor.js","D:/a/1/s/sites/lib/util/eventobserver.js","D:/a/1/s/sites/lib/util/filter.js","D:/a/1/s/sites/lib/util/index.js","D:/a/1/s/lib/util/insightspublisher/index.js","D:/a/1/s/lib/util/insightspublisher/null.js","D:/a/1/s/sites/lib/util/localmediarestartdeferreds.js","D:/a/1/s/sites/lib/util/log.js","D:/a/1/s/sites/lib/util/movingaveragedelta.js","D:/a/1/s/sites/lib/util/networkmonitor.js","D:/a/1/s/sites/lib/util/nullobserver.js","D:/a/1/s/lib/util/sdp/index.js","D:/a/1/s/lib/util/sdp/issue8329.js","D:/a/1/s/lib/util/sdp/simulcast.js","D:/a/1/s/lib/util/sdp/trackmatcher.js","D:/a/1/s/sites/lib/util/sid.js","D:/a/1/s/sites/lib/util/support.js","D:/a/1/s/sites/lib/util/timeout.js","D:/a/1/s/sites/lib/util/twilio-video-errors.js","D:/a/1/s/sites/lib/util/twilioerror.js","D:/a/1/s/sites/lib/util/twiliowarning.js","D:/a/1/s/sites/lib/util/validate.js","D:/a/1/s/sites/lib/vendor/inherits.js","D:/a/1/s/sites/lib/vendor/loglevel.js","D:/a/1/s/sites/lib/webaudio/audiocontext.js","D:/a/1/s/sites/lib/webaudio/detectsilence.js","D:/a/1/s/sites/lib/webaudio/workaround180748.js","D:/a/1/s/sites/lib/webrtc/getstats.js","D:/a/1/s/sites/lib/webrtc/getusermedia.js","D:/a/1/s/sites/lib/webrtc/index.js","D:/a/1/s/sites/lib/webrtc/mediastream.js","D:/a/1/s/sites/lib/webrtc/mediastreamtrack.js","D:/a/1/s/sites/lib/webrtc/rtcicecandidate.js","D:/a/1/s/lib/webrtc/rtcpeerconnection/chrome.js","D:/a/1/s/lib/webrtc/rtcpeerconnection/firefox.js","D:/a/1/s/lib/webrtc/rtcpeerconnection/index.js","D:/a/1/s/lib/webrtc/rtcpeerconnection/safari.js","D:/a/1/s/sites/lib/webrtc/rtcrtpsender.js","D:/a/1/s/lib/webrtc/rtcsessiondescription/chrome.js","D:/a/1/s/lib/webrtc/rtcsessiondescription/firefox.js","D:/a/1/s/lib/webrtc/rtcsessiondescription/index.js","D:/a/1/s/lib/webrtc/util/eventtarget.js","D:/a/1/s/lib/webrtc/util/index.js","D:/a/1/s/lib/webrtc/util/latch.js","D:/a/1/s/lib/webrtc/util/sdp.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/twilio-video/src/ws.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/universal-cookie/es6/Cookies.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/universal-cookie/es6/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/universal-cookie/es6/utils.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/universal-cookie/node_modules/cookie/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/url/url.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/url/util.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isObject.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_freeGlobal.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_root.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/now.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Symbol.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getRawTag.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_objectToString.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseGetTag.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isObjectLike.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isSymbol.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/toNumber.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/debounce.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arrayReduce.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_basePropertyOf.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_deburrLetter.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arrayMap.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseToString.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/toString.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/deburr.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_asciiWords.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hasUnicodeWord.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_unicodeWords.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/words.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_createCompounder.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/kebabCase.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arrayPush.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsArguments.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isArguments.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isFlattenable.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseFlatten.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_listCacheClear.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/eq.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_assocIndexOf.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_listCacheDelete.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_listCacheGet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_listCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_listCacheSet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_ListCache.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stackClear.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stackDelete.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stackGet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stackHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isFunction.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_coreJsData.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isMasked.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_toSource.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsNative.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getValue.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getNative.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Map.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_nativeCreate.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hashClear.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hashDelete.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hashGet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hashHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hashSet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Hash.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapCacheClear.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isKeyable.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getMapData.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapCacheDelete.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapCacheGet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapCacheSet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_MapCache.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stackSet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Stack.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_setCacheAdd.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_setCacheHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_SetCache.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arraySome.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_cacheHas.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_equalArrays.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Uint8Array.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_mapToArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_setToArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_equalByTag.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseGetAllKeys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arrayFilter.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/stubArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getSymbols.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseTimes.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/stubFalse.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isBuffer.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isIndex.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isLength.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsTypedArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseUnary.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_nodeUtil.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isTypedArray.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_arrayLikeKeys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isPrototype.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_overArg.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_nativeKeys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseKeys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isArrayLike.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/keys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getAllKeys.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_equalObjects.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_DataView.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Promise.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_Set.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_WeakMap.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getTag.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsEqualDeep.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsEqual.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIsMatch.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isStrictComparable.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getMatchData.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_matchesStrictComparable.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseMatches.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_isKey.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/memoize.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_memoizeCapped.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_stringToPath.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_castPath.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_toKey.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseGet.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/get.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseHasIn.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_hasPath.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/hasIn.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseMatchesProperty.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/identity.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseProperty.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_basePropertyDeep.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/property.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseIteratee.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_createBaseFor.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseFor.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseForOwn.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_createBaseEach.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseEach.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_baseMap.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/map.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/flatMap.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isString.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isNumber.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/_getPrototype.js","D:/a/1/s/sites/MyBSWHealth3/node_modules/lodash/isPlainObject.js","D:/a/1/s/sites/MyBSWHealth3/src/asMediaQuery.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/md5.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/nil.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/parse.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/regex.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/rng.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/sha1.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/stringify.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/v1.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/v3.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/v35.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/v4.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/v5.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/validate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/uuid/dist/esm-browser/version.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/value-equal/esm/value-equal.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/void-elements/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/warning/warning.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/webpack/buildin/global.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/webpack/buildin/harmony-module.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/webpack/buildin/module.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/whatwg-fetch/fetch.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/xlsx/xlsx.mjs","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/xtend/immutable.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/Condition.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/Lazy.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/Reference.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/ValidationError.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/array.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/boolean.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/date.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/index.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/locale.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/mixed.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/number.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/object.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/schema.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/setLocale.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/string.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/ReferenceSet.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/createValidation.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/isAbsent.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/isSchema.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/isodate.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/printValue.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/reach.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/runTests.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/sortByKeyOrder.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/sortFields.js","D:/a/1/s/sites/MyBSWHealth3/ClientApp/node_modules/yup/es/util/toArray.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports[\"@amityco/js-sdk\"]=t():e[\"@amityco/js-sdk\"]=t()}(\"undefined\"!=typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=171)}([function(e,t,r){var n;\"undefined\"!=typeof self&&self,e.exports=(n=r(3),function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=50)}([function(e,t){var r=e.exports={version:\"2.5.7\"};\"number\"==typeof __e&&(__e=r)},function(e,t,r){var n=r(24)(\"wks\"),i=r(16),o=r(2).Symbol,a=\"function\"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)(\"Symbol.\"+e))}).store=n},function(e,t){var r=e.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=r)},function(e,t,r){var n=r(2),i=r(0),o=r(36),a=r(8),s=r(6),u=function(e,t,r){var c,l,f,d=e&u.F,h=e&u.G,p=e&u.S,y=e&u.P,m=e&u.B,b=e&u.W,g=h?i:i[t]||(i[t]={}),v=g.prototype,_=h?n:p?n[t]:(n[t]||{}).prototype;for(c in h&&(r=t),r)(l=!d&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:r[c],g[c]=h&&\"function\"!=typeof _[c]?r[c]:m&&l?o(f,n):b&&_[c]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):y&&\"function\"==typeof f?o(Function.call,f):f,y&&((g.virtual||(g.virtual={}))[c]=f,e&u.R&&v&&!v[c]&&a(v,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,r){var n=r(9),i=r(37),o=r(19),a=Object.defineProperty;t.f=r(5)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if(\"get\"in r||\"set\"in r)throw TypeError(\"Accessors not supported!\");return\"value\"in r&&(e[t]=r.value),e}},function(e,t,r){e.exports=!r(11)((function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a}))},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(40),i=r(21);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(4),i=r(13);e.exports=r(5)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(10);e.exports=function(e){if(!n(e))throw TypeError(e+\" is not an object!\");return e}},function(e,t){e.exports=function(e){return\"object\"==typeof e?null!==e:\"function\"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(39),i=r(25);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t){e.exports=!0},function(e,t){var r=0,n=Math.random();e.exports=function(e){return\"Symbol(\".concat(void 0===e?\"\":e,\")_\",(++r+n).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=s(r(103)),i=s(r(41)),o=s(r(42)),a=s(r(35));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t){(0,i.default)(this,e),this._name=t||this.constructor.name,this.dispatchToken=a.default.register(this,this._name)}return(0,o.default)(e,[{key:\"reduce\",value:function(e){if(!e.type)throw new Error(\"Action dispatched without a type\");var t=e.type.split(\".\"),r=(0,n.default)(t,2),i=r[0],o=r[1];if(i===this._name&&this._reducers){var a=this._reducers.get(o);return a?a.call(this,e):void 0}if(this._globalReducers){var s=this._globalReducers.get(e.type);return s?s.call(this,e):void 0}}}]),e}();t.default=u},function(e,t,r){var n=r(10);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&\"function\"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if(\"function\"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&\"function\"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError(\"Can't convert object to primitive value\")}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError(\"Can't call method on \"+e);return e}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(24)(\"keys\"),i=r(16);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){var n=r(0),i=r(2),o=i[\"__core-js_shared__\"]||(i[\"__core-js_shared__\"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:n.version,mode:r(15)?\"pure\":\"global\",copyright:\"© 2018 Denis Pushkarev (zloirock.ru)\"})},function(e,t){e.exports=\"constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf\".split(\",\")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(21);e.exports=function(e){return Object(n(e))}},function(e,t,r){\"use strict\";var n=r(66)(!0);r(44)(String,\"String\",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(9),i=r(68),o=r(25),a=r(23)(\"IE_PROTO\"),s=function(){},u=function(){var e,t=r(38)(\"iframe\"),n=o.length;for(t.style.display=\"none\",r(69).appendChild(t),t.src=\"javascript:\",(e=t.contentWindow.document).open(),e.write(\"\";\r\n var nW = globalObject.open();\r\n\r\n if (nW !== null) {\r\n nW.document.write(htmlForNewWindow);\r\n }\r\n return nW;\r\n } else {\r\n throw new Error(\r\n \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n );\r\n }\r\n case \"pdfjsnewwindow\":\r\n if (\r\n Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n ) {\r\n var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n var htmlForPDFjsNewWindow =\r\n \"\" +\r\n \"\" +\r\n '' +\r\n \"\";\r\n var dataURLNewWindow = globalObject.open();\r\n if (dataURLNewWindow !== null) {\r\n dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n dataURLNewWindow.document.title = options.filename;\r\n }\r\n if (dataURLNewWindow || typeof safari === \"undefined\")\r\n return dataURLNewWindow;\r\n } else {\r\n throw new Error(\r\n \"The option dataurlnewwindow just works in a browser-environment.\"\r\n );\r\n }\r\n break;\r\n case \"datauri\":\r\n case \"dataurl\":\r\n return (globalObject.document.location.href = this.output(\r\n \"datauristring\",\r\n options\r\n ));\r\n default:\r\n return null;\r\n }\r\n }));\r\n\r\n /**\r\n * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n * @param {string} hotfixName - The name of the hotfix to check.\r\n * @returns {boolean}\r\n */\r\n var hasHotfix = function(hotfixName) {\r\n return (\r\n Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n );\r\n };\r\n\r\n switch (unit) {\r\n case \"pt\":\r\n scaleFactor = 1;\r\n break;\r\n case \"mm\":\r\n scaleFactor = 72 / 25.4;\r\n break;\r\n case \"cm\":\r\n scaleFactor = 72 / 2.54;\r\n break;\r\n case \"in\":\r\n scaleFactor = 72;\r\n break;\r\n case \"px\":\r\n if (hasHotfix(\"px_scaling\") == true) {\r\n scaleFactor = 72 / 96;\r\n } else {\r\n scaleFactor = 96 / 72;\r\n }\r\n break;\r\n case \"pc\":\r\n scaleFactor = 12;\r\n break;\r\n case \"em\":\r\n scaleFactor = 12;\r\n break;\r\n case \"ex\":\r\n scaleFactor = 6;\r\n break;\r\n default:\r\n if (typeof unit === \"number\") {\r\n scaleFactor = unit;\r\n } else {\r\n throw new Error(\"Invalid unit: \" + unit);\r\n }\r\n }\r\n\r\n var encryption = null;\r\n setCreationDate();\r\n setFileId();\r\n\r\n var getEncryptor = function(objectId) {\r\n if (encryptionOptions !== null) {\r\n return encryption.encryptor(objectId, 0);\r\n }\r\n return function(data) {\r\n return data;\r\n };\r\n };\r\n\r\n //---------------------------------------\r\n // Public API\r\n\r\n var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n pageNumberOneBased\r\n ) {\r\n if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n }\r\n var objId = pagesContext[pageNumberOneBased].objId;\r\n return {\r\n objId: objId,\r\n pageNumber: pageNumberOneBased,\r\n pageContext: pagesContext[pageNumberOneBased]\r\n };\r\n });\r\n\r\n var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n objId\r\n ) {\r\n if (isNaN(objId) || objId % 1 !== 0) {\r\n throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n }\r\n for (var pageNumber in pagesContext) {\r\n if (pagesContext[pageNumber].objId === objId) {\r\n break;\r\n }\r\n }\r\n return getPageInfo(pageNumber);\r\n });\r\n\r\n var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n return {\r\n objId: pagesContext[currentPage].objId,\r\n pageNumber: currentPage,\r\n pageContext: pagesContext[currentPage]\r\n };\r\n });\r\n\r\n /**\r\n * Adds (and transfers the focus to) new page to the PDF document.\r\n * @param format {String/Array} The format of the new page. Can be:
\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name addPage\r\n */\r\n API.addPage = function() {\r\n _addPage.apply(this, arguments);\r\n return this;\r\n };\r\n /**\r\n * Adds (and transfers the focus to) new page to the PDF document.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name setPage\r\n * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n * @example\r\n * doc = jsPDF()\r\n * doc.addPage()\r\n * doc.addPage()\r\n * doc.text('I am on page 3', 10, 10)\r\n * doc.setPage(1)\r\n * doc.text('I am on page 1', 10, 10)\r\n */\r\n API.setPage = function() {\r\n _setPage.apply(this, arguments);\r\n setOutputDestination.call(this, pages[currentPage]);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name insertPage\r\n * @memberof jsPDF#\r\n *\r\n * @function\r\n * @instance\r\n * @param {Object} beforePage\r\n * @returns {jsPDF}\r\n */\r\n API.insertPage = function(beforePage) {\r\n this.addPage();\r\n this.movePage(currentPage, beforePage);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name movePage\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {number} targetPage\r\n * @param {number} beforePage\r\n * @returns {jsPDF}\r\n */\r\n API.movePage = function(targetPage, beforePage) {\r\n var tmpPages, tmpPagesContext;\r\n if (targetPage > beforePage) {\r\n tmpPages = pages[targetPage];\r\n tmpPagesContext = pagesContext[targetPage];\r\n for (var i = targetPage; i > beforePage; i--) {\r\n pages[i] = pages[i - 1];\r\n pagesContext[i] = pagesContext[i - 1];\r\n }\r\n pages[beforePage] = tmpPages;\r\n pagesContext[beforePage] = tmpPagesContext;\r\n this.setPage(beforePage);\r\n } else if (targetPage < beforePage) {\r\n tmpPages = pages[targetPage];\r\n tmpPagesContext = pagesContext[targetPage];\r\n for (var j = targetPage; j < beforePage; j++) {\r\n pages[j] = pages[j + 1];\r\n pagesContext[j] = pagesContext[j + 1];\r\n }\r\n pages[beforePage] = tmpPages;\r\n pagesContext[beforePage] = tmpPagesContext;\r\n this.setPage(beforePage);\r\n }\r\n return this;\r\n };\r\n\r\n /**\r\n * Deletes a page from the PDF.\r\n * @name deletePage\r\n * @memberof jsPDF#\r\n * @function\r\n * @param {number} targetPage\r\n * @instance\r\n * @returns {jsPDF}\r\n */\r\n API.deletePage = function() {\r\n _deletePage.apply(this, arguments);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n *\r\n * @function\r\n * @instance\r\n * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n * @param {number} [options.charSpace=0] - The space between each letter.\r\n * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n * @param {Object} [options.flags] - Flags for to8bitStream.\r\n * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n *\r\n * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name text\r\n */\r\n API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n /*\r\n * Inserts something like this into PDF\r\n * BT\r\n * /F1 16 Tf % Font name + size\r\n * 16 TL % How many units down for next line in multiline text\r\n * 0 g % color\r\n * 28.35 813.54 Td % position\r\n * (line one) Tj\r\n * T* (line two) Tj\r\n * T* (line three) Tj\r\n * ET\r\n */\r\n options = options || {};\r\n var scope = options.scope || this;\r\n var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n // in effort to make all calls have similar signature like\r\n // function(data, coordinates... , miscellaneous)\r\n // this method had its args flipped.\r\n // code below allows backward compatibility with old arg order.\r\n if (\r\n typeof text === \"number\" &&\r\n typeof x === \"number\" &&\r\n (typeof y === \"string\" || Array.isArray(y))\r\n ) {\r\n var tmp = y;\r\n y = x;\r\n x = text;\r\n text = tmp;\r\n }\r\n\r\n var transformationMatrix;\r\n\r\n if (arguments[3] instanceof Matrix === false) {\r\n flags = arguments[3];\r\n angle = arguments[4];\r\n align = arguments[5];\r\n\r\n if (typeof flags !== \"object\" || flags === null) {\r\n if (typeof angle === \"string\") {\r\n align = angle;\r\n angle = null;\r\n }\r\n if (typeof flags === \"string\") {\r\n align = flags;\r\n flags = null;\r\n }\r\n if (typeof flags === \"number\") {\r\n angle = flags;\r\n flags = null;\r\n }\r\n options = {\r\n flags: flags,\r\n angle: angle,\r\n align: align\r\n };\r\n }\r\n } else {\r\n advancedApiModeTrap(\r\n \"The transform parameter of text() with a Matrix value\"\r\n );\r\n transformationMatrix = transform;\r\n }\r\n\r\n if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n }\r\n\r\n if (text.length === 0) {\r\n return scope;\r\n }\r\n\r\n var xtra = \"\";\r\n var isHex = false;\r\n var lineHeight =\r\n typeof options.lineHeightFactor === \"number\"\r\n ? options.lineHeightFactor\r\n : lineHeightFactor;\r\n var scaleFactor = scope.internal.scaleFactor;\r\n\r\n function ESC(s) {\r\n s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n return pdfEscape(s, flags);\r\n }\r\n\r\n function transformTextToSpecialArray(text) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n var da = [];\r\n var len = sa.length;\r\n var curDa;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (typeof curDa === \"string\") {\r\n da.push(curDa);\r\n } else {\r\n if (\r\n Array.isArray(text) &&\r\n (curDa.length === 1 ||\r\n (curDa[1] === undefined && curDa[2] === undefined))\r\n ) {\r\n da.push(curDa[0]);\r\n } else {\r\n da.push([curDa[0], curDa[1], curDa[2]]);\r\n }\r\n }\r\n }\r\n return da;\r\n }\r\n\r\n function processTextByFunction(text, processingFunction) {\r\n var result;\r\n if (typeof text === \"string\") {\r\n result = processingFunction(text)[0];\r\n } else if (Array.isArray(text)) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n var da = [];\r\n var len = sa.length;\r\n var curDa;\r\n var tmpResult;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (typeof curDa === \"string\") {\r\n da.push(processingFunction(curDa)[0]);\r\n } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n }\r\n }\r\n result = da;\r\n }\r\n return result;\r\n }\r\n\r\n //Check if text is of type String\r\n var textIsOfTypeString = false;\r\n var tmpTextIsOfTypeString = true;\r\n\r\n if (typeof text === \"string\") {\r\n textIsOfTypeString = true;\r\n } else if (Array.isArray(text)) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n da = [];\r\n var len = sa.length;\r\n var curDa;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (\r\n typeof curDa !== \"string\" ||\r\n (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n ) {\r\n tmpTextIsOfTypeString = false;\r\n }\r\n }\r\n textIsOfTypeString = tmpTextIsOfTypeString;\r\n }\r\n if (textIsOfTypeString === false) {\r\n throw new Error(\r\n 'Type of text must be string or Array. \"' +\r\n text +\r\n '\" is not recognized.'\r\n );\r\n }\r\n\r\n //If there are any newlines in text, we assume\r\n //the user wanted to print multiple lines, so break the\r\n //text up into an array. If the text is already an array,\r\n //we assume the user knows what they are doing.\r\n //Convert text into an array anyway to simplify\r\n //later code.\r\n\r\n if (typeof text === \"string\") {\r\n if (text.match(/[\\r?\\n]/)) {\r\n text = text.split(/\\r\\n|\\r|\\n/g);\r\n } else {\r\n text = [text];\r\n }\r\n }\r\n\r\n //baseline\r\n var height = activeFontSize / scope.internal.scaleFactor;\r\n var descent = height * (lineHeight - 1);\r\n\r\n switch (options.baseline) {\r\n case \"bottom\":\r\n y -= descent;\r\n break;\r\n case \"top\":\r\n y += height - descent;\r\n break;\r\n case \"hanging\":\r\n y += height - 2 * descent;\r\n break;\r\n case \"middle\":\r\n y += height / 2 - descent;\r\n break;\r\n case \"ideographic\":\r\n case \"alphabetic\":\r\n default:\r\n // do nothing, everything is fine\r\n break;\r\n }\r\n\r\n //multiline\r\n maxWidth = options.maxWidth || 0;\r\n\r\n if (maxWidth > 0) {\r\n if (typeof text === \"string\") {\r\n text = scope.splitTextToSize(text, maxWidth);\r\n } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n text = text.reduce(function(acc, textLine) {\r\n return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n }, []);\r\n }\r\n }\r\n\r\n //creating Payload-Object to make text byRef\r\n payload = {\r\n text: text,\r\n x: x,\r\n y: y,\r\n options: options,\r\n mutex: {\r\n pdfEscape: pdfEscape,\r\n activeFontKey: activeFontKey,\r\n fonts: fonts,\r\n activeFontSize: activeFontSize\r\n }\r\n };\r\n events.publish(\"preProcessText\", payload);\r\n\r\n text = payload.text;\r\n options = payload.options;\r\n\r\n //angle\r\n angle = options.angle;\r\n\r\n if (\r\n transformationMatrix instanceof Matrix === false &&\r\n angle &&\r\n typeof angle === \"number\"\r\n ) {\r\n angle *= Math.PI / 180;\r\n\r\n if (options.rotationDirection === 0) {\r\n angle = -angle;\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED) {\r\n angle = -angle;\r\n }\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n } else if (angle && angle instanceof Matrix) {\r\n transformationMatrix = angle;\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n transformationMatrix = identityMatrix;\r\n }\r\n\r\n //charSpace\r\n\r\n charSpace = options.charSpace || activeCharSpace;\r\n\r\n if (typeof charSpace !== \"undefined\") {\r\n xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n this.setCharSpace(this.getCharSpace() || 0);\r\n }\r\n\r\n horizontalScale = options.horizontalScale;\r\n if (typeof horizontalScale !== \"undefined\") {\r\n xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n }\r\n\r\n //lang\r\n\r\n var lang = options.lang;\r\n\r\n if (lang) {\r\n // xtra += \"/Lang (\" + lang +\")\\n\";\r\n }\r\n\r\n //renderingMode\r\n var renderingMode = -1;\r\n var parmRenderingMode =\r\n typeof options.renderingMode !== \"undefined\"\r\n ? options.renderingMode\r\n : options.stroke;\r\n var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n switch (parmRenderingMode) {\r\n case 0:\r\n case false:\r\n case \"fill\":\r\n renderingMode = 0;\r\n break;\r\n case 1:\r\n case true:\r\n case \"stroke\":\r\n renderingMode = 1;\r\n break;\r\n case 2:\r\n case \"fillThenStroke\":\r\n renderingMode = 2;\r\n break;\r\n case 3:\r\n case \"invisible\":\r\n renderingMode = 3;\r\n break;\r\n case 4:\r\n case \"fillAndAddForClipping\":\r\n renderingMode = 4;\r\n break;\r\n case 5:\r\n case \"strokeAndAddPathForClipping\":\r\n renderingMode = 5;\r\n break;\r\n case 6:\r\n case \"fillThenStrokeAndAddToPathForClipping\":\r\n renderingMode = 6;\r\n break;\r\n case 7:\r\n case \"addToPathForClipping\":\r\n renderingMode = 7;\r\n break;\r\n }\r\n\r\n var usedRenderingMode =\r\n typeof pageContext.usedRenderingMode !== \"undefined\"\r\n ? pageContext.usedRenderingMode\r\n : -1;\r\n\r\n //if the coder wrote it explicitly to use a specific\r\n //renderingMode, then use it\r\n if (renderingMode !== -1) {\r\n xtra += renderingMode + \" Tr\\n\";\r\n //otherwise check if we used the rendering Mode already\r\n //if so then set the rendering Mode...\r\n } else if (usedRenderingMode !== -1) {\r\n xtra += \"0 Tr\\n\";\r\n }\r\n\r\n if (renderingMode !== -1) {\r\n pageContext.usedRenderingMode = renderingMode;\r\n }\r\n\r\n //align\r\n align = options.align || \"left\";\r\n var leading = activeFontSize * lineHeight;\r\n var pageWidth = scope.internal.pageSize.getWidth();\r\n var activeFont = fonts[activeFontKey];\r\n charSpace = options.charSpace || activeCharSpace;\r\n maxWidth = options.maxWidth || 0;\r\n\r\n var lineWidths;\r\n flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n var wordSpacingPerLine = [];\r\n\r\n if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n da = transformTextToSpecialArray(text);\r\n var newY;\r\n if (align !== \"left\") {\r\n lineWidths = da.map(function(v) {\r\n return (\r\n (scope.getStringUnitWidth(v, {\r\n font: activeFont,\r\n charSpace: charSpace,\r\n fontSize: activeFontSize,\r\n doKerning: false\r\n }) *\r\n activeFontSize) /\r\n scaleFactor\r\n );\r\n });\r\n }\r\n //The first line uses the \"main\" Td setting,\r\n //and the subsequent lines are offset by the\r\n //previous line's x coordinate.\r\n var prevWidth = 0;\r\n var newX;\r\n if (align === \"right\") {\r\n //The passed in x coordinate defines the\r\n //rightmost point of the text.\r\n x -= lineWidths[0];\r\n text = [];\r\n len = da.length;\r\n for (var i = 0; i < len; i++) {\r\n if (i === 0) {\r\n newX = getHorizontalCoordinate(x);\r\n newY = getVerticalCoordinate(y);\r\n } else {\r\n newX = scale(prevWidth - lineWidths[i]);\r\n newY = -leading;\r\n }\r\n text.push([da[i], newX, newY]);\r\n prevWidth = lineWidths[i];\r\n }\r\n } else if (align === \"center\") {\r\n //The passed in x coordinate defines\r\n //the center point.\r\n x -= lineWidths[0] / 2;\r\n text = [];\r\n len = da.length;\r\n for (var j = 0; j < len; j++) {\r\n if (j === 0) {\r\n newX = getHorizontalCoordinate(x);\r\n newY = getVerticalCoordinate(y);\r\n } else {\r\n newX = scale((prevWidth - lineWidths[j]) / 2);\r\n newY = -leading;\r\n }\r\n text.push([da[j], newX, newY]);\r\n prevWidth = lineWidths[j];\r\n }\r\n } else if (align === \"left\") {\r\n text = [];\r\n len = da.length;\r\n for (var h = 0; h < len; h++) {\r\n text.push(da[h]);\r\n }\r\n } else if (align === \"justify\") {\r\n text = [];\r\n len = da.length;\r\n maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n\r\n for (var l = 0; l < len; l++) {\r\n newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n if (l < len - 1) {\r\n wordSpacingPerLine.push(\r\n hpf(\r\n scale(\r\n (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n )\r\n )\r\n );\r\n } else {\r\n wordSpacingPerLine.push(0);\r\n }\r\n text.push([da[l], newX, newY]);\r\n }\r\n } else {\r\n throw new Error(\r\n 'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n );\r\n }\r\n }\r\n\r\n //R2L\r\n var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n if (doReversing === true) {\r\n text = processTextByFunction(text, function(text, posX, posY) {\r\n return [\r\n text\r\n .split(\"\")\r\n .reverse()\r\n .join(\"\"),\r\n posX,\r\n posY\r\n ];\r\n });\r\n }\r\n\r\n //creating Payload-Object to make text byRef\r\n payload = {\r\n text: text,\r\n x: x,\r\n y: y,\r\n options: options,\r\n mutex: {\r\n pdfEscape: pdfEscape,\r\n activeFontKey: activeFontKey,\r\n fonts: fonts,\r\n activeFontSize: activeFontSize\r\n }\r\n };\r\n events.publish(\"postProcessText\", payload);\r\n\r\n text = payload.text;\r\n isHex = payload.mutex.isHex || false;\r\n\r\n //Escaping\r\n var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n if (\r\n activeFontEncoding === \"WinAnsiEncoding\" ||\r\n activeFontEncoding === \"StandardEncoding\"\r\n ) {\r\n text = processTextByFunction(text, function(text, posX, posY) {\r\n return [ESC(text), posX, posY];\r\n });\r\n }\r\n\r\n da = transformTextToSpecialArray(text);\r\n\r\n text = [];\r\n var STRING = 0;\r\n var ARRAY = 1;\r\n var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n var posX;\r\n var posY;\r\n var content;\r\n var wordSpacing = \"\";\r\n\r\n var generatePosition = function(\r\n parmPosX,\r\n parmPosY,\r\n parmTransformationMatrix\r\n ) {\r\n var position = \"\";\r\n if (parmTransformationMatrix instanceof Matrix) {\r\n // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n // in the coordinate system established by this matrix\r\n if (typeof options.angle === \"number\") {\r\n parmTransformationMatrix = matrixMult(\r\n parmTransformationMatrix,\r\n new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n );\r\n } else {\r\n parmTransformationMatrix = matrixMult(\r\n new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n parmTransformationMatrix\r\n );\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED) {\r\n parmTransformationMatrix = matrixMult(\r\n new Matrix(1, 0, 0, -1, 0, 0),\r\n parmTransformationMatrix\r\n );\r\n }\r\n\r\n position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n } else {\r\n position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n }\r\n return position;\r\n };\r\n\r\n for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n wordSpacing = \"\";\r\n\r\n switch (variant) {\r\n case ARRAY:\r\n content =\r\n (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n posX = parseFloat(da[lineIndex][1]);\r\n posY = parseFloat(da[lineIndex][2]);\r\n break;\r\n case STRING:\r\n content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n posX = getHorizontalCoordinate(x);\r\n posY = getVerticalCoordinate(y);\r\n break;\r\n }\r\n\r\n if (\r\n typeof wordSpacingPerLine !== \"undefined\" &&\r\n typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n ) {\r\n wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n }\r\n\r\n if (lineIndex === 0) {\r\n text.push(\r\n wordSpacing +\r\n generatePosition(posX, posY, transformationMatrix) +\r\n content\r\n );\r\n } else if (variant === STRING) {\r\n text.push(wordSpacing + content);\r\n } else if (variant === ARRAY) {\r\n text.push(\r\n wordSpacing +\r\n generatePosition(posX, posY, transformationMatrix) +\r\n content\r\n );\r\n }\r\n }\r\n\r\n text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n text += \" Tj\\n\";\r\n\r\n var result = \"BT\\n/\";\r\n result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n result += textColor + \"\\n\";\r\n result += xtra;\r\n result += text;\r\n result += \"ET\";\r\n\r\n out(result);\r\n usedFonts[activeFontKey] = true;\r\n return scope;\r\n };\r\n\r\n // PDF supports these path painting and clip path operators:\r\n //\r\n // S - stroke\r\n // s - close/stroke\r\n // f (F) - fill non-zero\r\n // f* - fill evenodd\r\n // B - fill stroke nonzero\r\n // B* - fill stroke evenodd\r\n // b - close fill stroke nonzero\r\n // b* - close fill stroke evenodd\r\n // n - nothing (consume path)\r\n // W - clip nonzero\r\n // W* - clip evenodd\r\n //\r\n // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n // method.\r\n /**\r\n *\r\n * @name clip\r\n * @function\r\n * @instance\r\n * @param {string} rule Only possible value is 'evenodd'\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @description All .clip() after calling drawing ops with a style argument of null.\r\n */\r\n var clip = (API.__private__.clip = API.clip = function(rule) {\r\n // Call .clip() after calling drawing ops with a style argument of null\r\n // W is the PDF clipping op\r\n if (\"evenodd\" === rule) {\r\n out(\"W*\");\r\n } else {\r\n out(\"W\");\r\n }\r\n return this;\r\n });\r\n\r\n /**\r\n * @name clipEvenOdd\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n * that this will NOT consume the current path. In order to only use this path for clipping call\r\n * {@link API.discardPath} afterwards.\r\n */\r\n API.clipEvenOdd = function() {\r\n return clip(\"evenodd\");\r\n };\r\n\r\n /**\r\n * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n * @name discardPath\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.__private__.discardPath = API.discardPath = function() {\r\n out(\"n\");\r\n return this;\r\n };\r\n\r\n var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n var validStyleVariants = [\r\n undefined,\r\n null,\r\n \"S\",\r\n \"D\",\r\n \"F\",\r\n \"DF\",\r\n \"FD\",\r\n \"f\",\r\n \"f*\",\r\n \"B\",\r\n \"B*\",\r\n \"n\"\r\n ];\r\n var result = false;\r\n if (validStyleVariants.indexOf(style) !== -1) {\r\n result = true;\r\n }\r\n return result;\r\n });\r\n\r\n API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n operator\r\n ) {\r\n if (isValidStyle(operator)) {\r\n defaultPathOperation = operator;\r\n }\r\n return this;\r\n };\r\n\r\n var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n // see path-painting operators in PDF spec\r\n var op = defaultPathOperation; // stroke\r\n\r\n switch (style) {\r\n case \"D\":\r\n case \"S\":\r\n op = \"S\"; // stroke\r\n break;\r\n case \"F\":\r\n op = \"f\"; // fill\r\n break;\r\n case \"FD\":\r\n case \"DF\":\r\n op = \"B\";\r\n break;\r\n case \"f\":\r\n case \"f*\":\r\n case \"B\":\r\n case \"B*\":\r\n /*\r\n Allow direct use of these PDF path-painting operators:\r\n - f fill using nonzero winding number rule\r\n - f* fill using even-odd rule\r\n - B fill then stroke with fill using non-zero winding number rule\r\n - B* fill then stroke with fill using even-odd rule\r\n */\r\n op = style;\r\n break;\r\n }\r\n return op;\r\n });\r\n\r\n /**\r\n * Close the current path. The PDF \"h\" operator.\r\n * @name close\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n var close = (API.close = function() {\r\n out(\"h\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Stroke the path. The PDF \"S\" operator.\r\n * @name stroke\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.stroke = function() {\r\n out(\"S\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n * @name fill\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fill = function(pattern) {\r\n fillWithOptionalPattern(\"f\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill the current path using the even-odd rule. The PDF f* operator.\r\n * @see API.fill\r\n * @name fillEvenOdd\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillEvenOdd = function(pattern) {\r\n fillWithOptionalPattern(\"f*\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n * @see API.fill\r\n * @name fillStroke\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillStroke = function(pattern) {\r\n fillWithOptionalPattern(\"B\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n * @see API.fill\r\n * @name fillStrokeEvenOdd\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillStrokeEvenOdd = function(pattern) {\r\n fillWithOptionalPattern(\"B*\", pattern);\r\n return this;\r\n };\r\n\r\n var fillWithOptionalPattern = function(style, pattern) {\r\n if (typeof pattern === \"object\") {\r\n fillWithPattern(pattern, style);\r\n } else {\r\n out(style);\r\n }\r\n };\r\n\r\n var putStyle = function(style) {\r\n if (\r\n style === null ||\r\n (apiMode === ApiMode.ADVANCED && style === undefined)\r\n ) {\r\n return;\r\n }\r\n\r\n style = getStyle(style);\r\n\r\n // stroking / filling / both the path\r\n out(style);\r\n };\r\n\r\n function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n var clone = new TilingPattern(\r\n boundingBox || this.boundingBox,\r\n xStep || this.xStep,\r\n yStep || this.yStep,\r\n this.gState,\r\n matrix || this.matrix\r\n );\r\n clone.stream = this.stream;\r\n var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n addPattern(key, clone);\r\n return clone;\r\n }\r\n\r\n var fillWithPattern = function(patternData, style) {\r\n var patternId = patternMap[patternData.key];\r\n var pattern = patterns[patternId];\r\n\r\n if (pattern instanceof ShadingPattern) {\r\n out(\"q\");\r\n\r\n out(clipRuleFromStyle(style));\r\n\r\n if (pattern.gState) {\r\n API.setGState(pattern.gState);\r\n }\r\n out(patternData.matrix.toString() + \" cm\");\r\n out(\"/\" + patternId + \" sh\");\r\n out(\"Q\");\r\n } else if (pattern instanceof TilingPattern) {\r\n // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n // so we must flip them\r\n var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n if (patternData.matrix) {\r\n matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n // for each use\r\n patternId = cloneTilingPattern.call(\r\n pattern,\r\n patternData.key,\r\n patternData.boundingBox,\r\n patternData.xStep,\r\n patternData.yStep,\r\n matrix\r\n ).id;\r\n }\r\n\r\n out(\"q\");\r\n out(\"/Pattern cs\");\r\n out(\"/\" + patternId + \" scn\");\r\n\r\n if (pattern.gState) {\r\n API.setGState(pattern.gState);\r\n }\r\n\r\n out(style);\r\n out(\"Q\");\r\n }\r\n };\r\n\r\n var clipRuleFromStyle = function(style) {\r\n switch (style) {\r\n case \"f\":\r\n case \"F\":\r\n return \"W n\";\r\n case \"f*\":\r\n return \"W* n\";\r\n case \"B\":\r\n return \"W S\";\r\n case \"B*\":\r\n return \"W* S\";\r\n\r\n // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n case \"S\":\r\n return \"W S\";\r\n case \"n\":\r\n return \"W n\";\r\n }\r\n };\r\n\r\n /**\r\n * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n * @param {number} x\r\n * @param {number} y\r\n * @name moveTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var moveTo = (API.moveTo = function(x, y) {\r\n out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n * @param {number} x\r\n * @param {number} y\r\n * @memberof jsPDF#\r\n * @name lineTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var lineTo = (API.lineTo = function(x, y) {\r\n out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n * @param {number} x1\r\n * @param {number} y1\r\n * @param {number} x2\r\n * @param {number} y2\r\n * @param {number} x3\r\n * @param {number} y3\r\n * @memberof jsPDF#\r\n * @name curveTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n out(\r\n [\r\n hpf(scale(x1)),\r\n hpf(transformScaleY(y1)),\r\n hpf(scale(x2)),\r\n hpf(transformScaleY(y2)),\r\n hpf(scale(x3)),\r\n hpf(transformScaleY(y3)),\r\n \"c\"\r\n ].join(\" \")\r\n );\r\n return this;\r\n });\r\n\r\n /**\r\n * Draw a line on the current page.\r\n *\r\n * @name line\r\n * @function\r\n * @instance\r\n * @param {number} x1\r\n * @param {number} y1\r\n * @param {number} x2\r\n * @param {number} y2\r\n * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n if (\r\n isNaN(x1) ||\r\n isNaN(y1) ||\r\n isNaN(x2) ||\r\n isNaN(y2) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n }\r\n if (apiMode === ApiMode.COMPAT) {\r\n return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n } else {\r\n return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n }\r\n };\r\n\r\n /**\r\n * @typedef {Object} PatternData\r\n * {Matrix|undefined} matrix\r\n * {Number|undefined} xStep\r\n * {Number|undefined} yStep\r\n * {Array.|undefined} boundingBox\r\n */\r\n\r\n /**\r\n * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n * All data points in `lines` are relative to last line origin.\r\n * `x`, `y` become x1,y1 for first line / curve in the set.\r\n * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n *\r\n * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name lines\r\n */\r\n API.__private__.lines = API.lines = function(\r\n lines,\r\n x,\r\n y,\r\n scale,\r\n style,\r\n closed\r\n ) {\r\n var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n // in effort to make all calls have similar signature like\r\n // function(content, coordinateX, coordinateY , miscellaneous)\r\n // this method had its args flipped.\r\n // code below allows backward compatibility with old arg order.\r\n if (typeof lines === \"number\") {\r\n tmp = y;\r\n y = x;\r\n x = lines;\r\n lines = tmp;\r\n }\r\n\r\n scale = scale || [1, 1];\r\n closed = closed || false;\r\n\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n !Array.isArray(lines) ||\r\n !Array.isArray(scale) ||\r\n !isValidStyle(style) ||\r\n typeof closed !== \"boolean\"\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n }\r\n\r\n // starting point\r\n moveTo(x, y);\r\n\r\n scalex = scale[0];\r\n scaley = scale[1];\r\n l = lines.length;\r\n //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n x4 = x; // last / ending point = starting point for first item.\r\n y4 = y; // last / ending point = starting point for first item.\r\n\r\n for (i = 0; i < l; i++) {\r\n leg = lines[i];\r\n if (leg.length === 2) {\r\n // simple line\r\n x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n lineTo(x4, y4);\r\n } else {\r\n // bezier curve\r\n x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n curveTo(x2, y2, x3, y3, x4, y4);\r\n }\r\n }\r\n\r\n if (closed) {\r\n close();\r\n }\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n * @param {Array} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n * six and \"h\" an empty array (or undefined).\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name path\r\n */\r\n API.path = function(lines) {\r\n for (var i = 0; i < lines.length; i++) {\r\n var leg = lines[i];\r\n var coords = leg.c;\r\n switch (leg.op) {\r\n case \"m\":\r\n moveTo(coords[0], coords[1]);\r\n break;\r\n case \"l\":\r\n lineTo(coords[0], coords[1]);\r\n break;\r\n case \"c\":\r\n curveTo.apply(this, coords);\r\n break;\r\n case \"h\":\r\n close();\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a rectangle to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} w Width (in units declared at inception of PDF document)\r\n * @param {number} h Height (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name rect\r\n */\r\n API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n }\r\n if (apiMode === ApiMode.COMPAT) {\r\n h = -h;\r\n }\r\n\r\n out(\r\n [\r\n hpf(scale(x)),\r\n hpf(transformScaleY(y)),\r\n hpf(scale(w)),\r\n hpf(scale(h)),\r\n \"re\"\r\n ].join(\" \")\r\n );\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a triangle to PDF.\r\n *\r\n * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name triangle\r\n */\r\n API.__private__.triangle = API.triangle = function(\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n x3,\r\n y3,\r\n style\r\n ) {\r\n if (\r\n isNaN(x1) ||\r\n isNaN(y1) ||\r\n isNaN(x2) ||\r\n isNaN(y2) ||\r\n isNaN(x3) ||\r\n isNaN(y3) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n }\r\n this.lines(\r\n [\r\n [x2 - x1, y2 - y1], // vector to point 2\r\n [x3 - x2, y3 - y2], // vector to point 3\r\n [x1 - x3, y1 - y3] // closing vector back to point 1\r\n ],\r\n x1,\r\n y1, // start of path\r\n [1, 1],\r\n style,\r\n true\r\n );\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a rectangle with rounded corners to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} w Width (in units declared at inception of PDF document)\r\n * @param {number} h Height (in units declared at inception of PDF document)\r\n * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name roundedRect\r\n */\r\n API.__private__.roundedRect = API.roundedRect = function(\r\n x,\r\n y,\r\n w,\r\n h,\r\n rx,\r\n ry,\r\n style\r\n ) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(w) ||\r\n isNaN(h) ||\r\n isNaN(rx) ||\r\n isNaN(ry) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n }\r\n var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n rx = Math.min(rx, w * 0.5);\r\n ry = Math.min(ry, h * 0.5);\r\n\r\n this.lines(\r\n [\r\n [w - 2 * rx, 0],\r\n [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n [0, h - 2 * ry],\r\n [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n [-w + 2 * rx, 0],\r\n [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n [0, -h + 2 * ry],\r\n [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n ],\r\n x + rx,\r\n y, // start of path\r\n [1, 1],\r\n style,\r\n true\r\n );\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds an ellipse to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name ellipse\r\n */\r\n API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(rx) ||\r\n isNaN(ry) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n }\r\n var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n moveTo(x + rx, y);\r\n curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds an circle to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} r Radius (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name circle\r\n */\r\n API.__private__.circle = API.circle = function(x, y, r, style) {\r\n if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n }\r\n return this.ellipse(x, y, r, r, style);\r\n };\r\n\r\n /**\r\n * Sets text font face, variant for upcoming text elements.\r\n * See output of jsPDF.getFontList() for possible font names, styles.\r\n *\r\n * @param {string} fontName Font name or family. Example: \"times\".\r\n * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setFont\r\n */\r\n API.setFont = function(fontName, fontStyle, fontWeight) {\r\n if (fontWeight) {\r\n fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n }\r\n activeFontKey = getFont(fontName, fontStyle, {\r\n disableWarning: false\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets text font face, variant for upcoming text elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {Object}\r\n * @memberof jsPDF#\r\n * @name getFont\r\n */\r\n var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n return fonts[getFont.apply(API, arguments)];\r\n });\r\n\r\n /**\r\n * Returns an object - a tree of fontName to fontStyle relationships available to\r\n * active PDF document.\r\n *\r\n * @public\r\n * @function\r\n * @instance\r\n * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n * @memberof jsPDF#\r\n * @name getFontList\r\n */\r\n API.__private__.getFontList = API.getFontList = function() {\r\n var list = {},\r\n fontName,\r\n fontStyle;\r\n\r\n for (fontName in fontmap) {\r\n if (fontmap.hasOwnProperty(fontName)) {\r\n list[fontName] = [];\r\n for (fontStyle in fontmap[fontName]) {\r\n if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n list[fontName].push(fontStyle);\r\n }\r\n }\r\n }\r\n }\r\n return list;\r\n };\r\n\r\n /**\r\n * Add a custom font to the current instance.\r\n *\r\n * @param {string} postScriptName PDF specification full name for the font.\r\n * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n * @param {string} fontStyle Style of the Font.\r\n * @param {number | string} fontWeight Weight of the Font.\r\n * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @name addFont\r\n * @returns {string} fontId\r\n */\r\n API.addFont = function(\r\n postScriptName,\r\n fontName,\r\n fontStyle,\r\n fontWeight,\r\n encoding\r\n ) {\r\n var encodingOptions = [\r\n \"StandardEncoding\",\r\n \"MacRomanEncoding\",\r\n \"Identity-H\",\r\n \"WinAnsiEncoding\"\r\n ];\r\n if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n //IE 11 fix\r\n encoding = arguments[3];\r\n } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n }\r\n encoding = encoding || \"Identity-H\";\r\n return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n };\r\n\r\n var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n /**\r\n * Gets the line width, default: 0.200025.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} lineWidth\r\n * @memberof jsPDF#\r\n * @name getLineWidth\r\n */\r\n var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n return lineWidth;\r\n });\r\n\r\n /**\r\n * Sets line width for upcoming lines.\r\n *\r\n * @param {number} width Line width (in units declared at inception of PDF document).\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineWidth\r\n */\r\n var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n width\r\n ) {\r\n lineWidth = width;\r\n out(hpf(scale(width)) + \" w\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Sets the dash pattern for upcoming lines.\r\n *\r\n * To reset the settings simply call the method without any parameters.\r\n * @param {Array} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n * @param {number} dashPhase The phase lines start with.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineDashPattern\r\n */\r\n API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n dashArray,\r\n dashPhase\r\n ) {\r\n dashArray = dashArray || [];\r\n dashPhase = dashPhase || 0;\r\n\r\n if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n }\r\n\r\n dashArray = dashArray\r\n .map(function(x) {\r\n return hpf(scale(x));\r\n })\r\n .join(\" \");\r\n dashPhase = hpf(scale(dashPhase));\r\n\r\n out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n return this;\r\n };\r\n\r\n var lineHeightFactor;\r\n\r\n var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n return activeFontSize * lineHeightFactor;\r\n });\r\n\r\n API.__private__.getLineHeight = API.getLineHeight = function() {\r\n return activeFontSize * lineHeightFactor;\r\n };\r\n\r\n /**\r\n * Sets the LineHeightFactor of proportion.\r\n *\r\n * @param {number} value LineHeightFactor value. Default: 1.15.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineHeightFactor\r\n */\r\n var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n value\r\n ) {\r\n value = value || 1.15;\r\n if (typeof value === \"number\") {\r\n lineHeightFactor = value;\r\n }\r\n return this;\r\n });\r\n\r\n /**\r\n * Gets the LineHeightFactor, default: 1.15.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} lineHeightFactor\r\n * @memberof jsPDF#\r\n * @name getLineHeightFactor\r\n */\r\n var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n return lineHeightFactor;\r\n });\r\n\r\n setLineHeightFactor(options.lineHeight);\r\n\r\n var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n value\r\n ) {\r\n return scale(value);\r\n });\r\n\r\n var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n value\r\n ) {\r\n if (apiMode === ApiMode.ADVANCED) {\r\n return value;\r\n } else {\r\n var pageHeight =\r\n pagesContext[currentPage].mediaBox.topRightY -\r\n pagesContext[currentPage].mediaBox.bottomLeftY;\r\n return pageHeight - scale(value);\r\n }\r\n });\r\n\r\n var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n value\r\n ) {\r\n return hpf(getHorizontalCoordinate(value));\r\n });\r\n\r\n var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n value\r\n ) {\r\n return hpf(getVerticalCoordinate(value));\r\n });\r\n\r\n var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n /**\r\n * Gets the stroke color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getDrawColor\r\n */\r\n API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n return decodeColorString(strokeColor);\r\n };\r\n\r\n /**\r\n * Sets the stroke color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setDrawColor\r\n */\r\n API.__private__.setStrokeColor = API.setDrawColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"draw\",\r\n precision: 2\r\n };\r\n\r\n strokeColor = encodeColorString(options);\r\n out(strokeColor);\r\n return this;\r\n };\r\n\r\n var fillColor = options.fillColor || \"0 g\";\r\n\r\n /**\r\n * Gets the fill color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getFillColor\r\n */\r\n API.__private__.getFillColor = API.getFillColor = function() {\r\n return decodeColorString(fillColor);\r\n };\r\n\r\n /**\r\n * Sets the fill color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setFillColor\r\n */\r\n API.__private__.setFillColor = API.setFillColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"fill\",\r\n precision: 2\r\n };\r\n\r\n fillColor = encodeColorString(options);\r\n out(fillColor);\r\n return this;\r\n };\r\n\r\n var textColor = options.textColor || \"0 g\";\r\n /**\r\n * Gets the text color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getTextColor\r\n */\r\n var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n return decodeColorString(textColor);\r\n });\r\n /**\r\n * Sets the text color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setTextColor\r\n */\r\n API.__private__.setTextColor = API.setTextColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"text\",\r\n precision: 3\r\n };\r\n textColor = encodeColorString(options);\r\n\r\n return this;\r\n };\r\n\r\n var activeCharSpace = options.charSpace;\r\n\r\n /**\r\n * Get global value of CharSpace.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} charSpace\r\n * @memberof jsPDF#\r\n * @name getCharSpace\r\n */\r\n var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n return parseFloat(activeCharSpace || 0);\r\n });\r\n\r\n /**\r\n * Set global value of CharSpace.\r\n *\r\n * @param {number} charSpace\r\n * @function\r\n * @instance\r\n * @returns {jsPDF} jsPDF-instance\r\n * @memberof jsPDF#\r\n * @name setCharSpace\r\n */\r\n API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n if (isNaN(charSpace)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n }\r\n activeCharSpace = charSpace;\r\n return this;\r\n };\r\n\r\n var lineCapID = 0;\r\n /**\r\n * Is an Object providing a mapping from human-readable to\r\n * integer flag values designating the varieties of line cap\r\n * and join styles.\r\n *\r\n * @memberof jsPDF#\r\n * @name CapJoinStyles\r\n */\r\n API.CapJoinStyles = {\r\n 0: 0,\r\n butt: 0,\r\n but: 0,\r\n miter: 0,\r\n 1: 1,\r\n round: 1,\r\n rounded: 1,\r\n circle: 1,\r\n 2: 2,\r\n projecting: 2,\r\n project: 2,\r\n square: 2,\r\n bevel: 2\r\n };\r\n\r\n /**\r\n * Sets the line cap styles.\r\n * See {jsPDF.CapJoinStyles} for variants.\r\n *\r\n * @param {String|Number} style A string or number identifying the type of line cap.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineCap\r\n */\r\n API.__private__.setLineCap = API.setLineCap = function(style) {\r\n var id = API.CapJoinStyles[style];\r\n if (id === undefined) {\r\n throw new Error(\r\n \"Line cap style of '\" +\r\n style +\r\n \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n );\r\n }\r\n lineCapID = id;\r\n out(id + \" J\");\r\n\r\n return this;\r\n };\r\n\r\n var lineJoinID = 0;\r\n /**\r\n * Sets the line join styles.\r\n * See {jsPDF.CapJoinStyles} for variants.\r\n *\r\n * @param {String|Number} style A string or number identifying the type of line join.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineJoin\r\n */\r\n API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n var id = API.CapJoinStyles[style];\r\n if (id === undefined) {\r\n throw new Error(\r\n \"Line join style of '\" +\r\n style +\r\n \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n );\r\n }\r\n lineJoinID = id;\r\n out(id + \" j\");\r\n\r\n return this;\r\n };\r\n\r\n var miterLimit;\r\n /**\r\n * Sets the miterLimit property, which effects the maximum miter length.\r\n *\r\n * @param {number} length The length of the miter\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineMiterLimit\r\n */\r\n API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n length\r\n ) {\r\n length = length || 0;\r\n if (isNaN(length)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n }\r\n out(hpf(scale(length)) + \" M\");\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * An object representing a pdf graphics state.\r\n * @class GState\r\n */\r\n\r\n /**\r\n *\r\n * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n * Supported are: opacity, stroke-opacity\r\n * @constructor\r\n */\r\n API.GState = GState;\r\n\r\n /**\r\n * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n * it will be added before use.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setGState\r\n */\r\n API.setGState = function(gState) {\r\n if (typeof gState === \"string\") {\r\n gState = gStates[gStatesMap[gState]];\r\n } else {\r\n gState = addGState(null, gState);\r\n }\r\n\r\n if (!gState.equals(activeGState)) {\r\n out(\"/\" + gState.id + \" gs\");\r\n activeGState = gState;\r\n }\r\n };\r\n\r\n /**\r\n * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n * @param {String} key Might also be null, if no later reference to this gState is needed\r\n * @param {Object} gState The gState object\r\n */\r\n var addGState = function(key, gState) {\r\n // only add it if it is not already present (the keys provided by the user must be unique!)\r\n if (key && gStatesMap[key]) return;\r\n var duplicate = false;\r\n for (var s in gStates) {\r\n if (gStates.hasOwnProperty(s)) {\r\n if (gStates[s].equals(gState)) {\r\n duplicate = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (duplicate) {\r\n gState = gStates[s];\r\n } else {\r\n var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n gStates[gStateKey] = gState;\r\n gState.id = gStateKey;\r\n }\r\n\r\n // several user keys may point to the same GState object\r\n key && (gStatesMap[key] = gState.id);\r\n\r\n events.publish(\"addGState\", gState);\r\n\r\n return gState;\r\n };\r\n\r\n /**\r\n * Adds a new {@link GState} for later use. See {@link setGState}.\r\n * @param {String} key\r\n * @param {GState} gState\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name addGState\r\n */\r\n API.addGState = function(key, gState) {\r\n addGState(key, gState);\r\n return this;\r\n };\r\n\r\n /**\r\n * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n * fill and stroke colors etc.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name saveGraphicsState\r\n */\r\n API.saveGraphicsState = function() {\r\n out(\"q\");\r\n // as we cannot set font key and size independently we must keep track of both\r\n fontStateStack.push({\r\n key: activeFontKey,\r\n size: activeFontSize,\r\n color: textColor\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name restoreGraphicsState\r\n */\r\n API.restoreGraphicsState = function() {\r\n out(\"Q\");\r\n\r\n // restore previous font state\r\n var fontState = fontStateStack.pop();\r\n activeFontKey = fontState.key;\r\n activeFontSize = fontState.size;\r\n textColor = fontState.color;\r\n\r\n activeGState = null;\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Appends this matrix to the left of all previously applied matrices.\r\n *\r\n * @param {Matrix} matrix\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setCurrentTransformationMatrix\r\n */\r\n API.setCurrentTransformationMatrix = function(matrix) {\r\n out(matrix.toString() + \" cm\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Inserts a debug comment into the generated pdf.\r\n * @function\r\n * @instance\r\n * @param {String} text\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name comment\r\n */\r\n API.comment = function(text) {\r\n out(\"#\" + text);\r\n return this;\r\n };\r\n\r\n /**\r\n * Point\r\n */\r\n var Point = function(x, y) {\r\n var _x = x || 0;\r\n Object.defineProperty(this, \"x\", {\r\n enumerable: true,\r\n get: function() {\r\n return _x;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _x = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _y = y || 0;\r\n Object.defineProperty(this, \"y\", {\r\n enumerable: true,\r\n get: function() {\r\n return _y;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _y = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _type = \"pt\";\r\n Object.defineProperty(this, \"type\", {\r\n enumerable: true,\r\n get: function() {\r\n return _type;\r\n },\r\n set: function(value) {\r\n _type = value.toString();\r\n }\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Rectangle\r\n */\r\n var Rectangle = function(x, y, w, h) {\r\n Point.call(this, x, y);\r\n this.type = \"rect\";\r\n\r\n var _w = w || 0;\r\n Object.defineProperty(this, \"w\", {\r\n enumerable: true,\r\n get: function() {\r\n return _w;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _w = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _h = h || 0;\r\n Object.defineProperty(this, \"h\", {\r\n enumerable: true,\r\n get: function() {\r\n return _h;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _h = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * FormObject/RenderTarget\r\n */\r\n\r\n var RenderTarget = function() {\r\n this.page = page;\r\n this.currentPage = currentPage;\r\n this.pages = pages.slice(0);\r\n this.pagesContext = pagesContext.slice(0);\r\n this.x = pageX;\r\n this.y = pageY;\r\n this.matrix = pageMatrix;\r\n this.width = getPageWidth(currentPage);\r\n this.height = getPageHeight(currentPage);\r\n this.outputDestination = outputDestination;\r\n\r\n this.id = \"\"; // set by endFormObject()\r\n this.objectNumber = -1; // will be set by putXObject()\r\n };\r\n\r\n RenderTarget.prototype.restore = function() {\r\n page = this.page;\r\n currentPage = this.currentPage;\r\n pagesContext = this.pagesContext;\r\n pages = this.pages;\r\n pageX = this.x;\r\n pageY = this.y;\r\n pageMatrix = this.matrix;\r\n setPageWidth(currentPage, this.width);\r\n setPageHeight(currentPage, this.height);\r\n outputDestination = this.outputDestination;\r\n };\r\n\r\n var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n // save current state\r\n renderTargetStack.push(new RenderTarget());\r\n\r\n // clear pages\r\n page = currentPage = 0;\r\n pages = [];\r\n pageX = x;\r\n pageY = y;\r\n\r\n pageMatrix = matrix;\r\n\r\n beginPage([width, height]);\r\n };\r\n\r\n var endFormObject = function(key) {\r\n // only add it if it is not already present (the keys provided by the user must be unique!)\r\n if (renderTargetMap[key]) {\r\n renderTargetStack.pop().restore();\r\n return;\r\n }\r\n\r\n // save the created xObject\r\n var newXObject = new RenderTarget();\r\n\r\n var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n newXObject.id = xObjectId;\r\n\r\n renderTargetMap[key] = xObjectId;\r\n renderTargets[xObjectId] = newXObject;\r\n\r\n events.publish(\"addFormObject\", newXObject);\r\n\r\n // restore state from stack\r\n renderTargetStack.pop().restore();\r\n };\r\n\r\n /**\r\n * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n * {@link doFormObject}. Nested form objects are possible.\r\n * x, y, width, height set the bounding box that is used to clip the content.\r\n *\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n * the parent's.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name beginFormObject\r\n */\r\n API.beginFormObject = function(x, y, width, height, matrix) {\r\n // The user can set the output target to a new form object. Nested form objects are possible.\r\n // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n // the PDF-Spec states:\r\n // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n // recommended although not required\"\r\n beginNewRenderTarget(x, y, width, height, matrix);\r\n return this;\r\n };\r\n\r\n /**\r\n * Completes and saves the form object.\r\n * @param {String} key The key by which this form object can be referenced.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name endFormObject\r\n */\r\n API.endFormObject = function(key) {\r\n endFormObject(key);\r\n return this;\r\n };\r\n\r\n /**\r\n * Draws the specified form object by referencing to the respective pdf XObject created with\r\n * {@link API.beginFormObject} and {@link endFormObject}.\r\n * The location is determined by matrix.\r\n *\r\n * @param {String} key The key to the form object.\r\n * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name doFormObject\r\n */\r\n API.doFormObject = function(key, matrix) {\r\n var xObject = renderTargets[renderTargetMap[key]];\r\n out(\"q\");\r\n out(matrix.toString() + \" cm\");\r\n out(\"/\" + xObject.id + \" Do\");\r\n out(\"Q\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Returns the form object specified by key.\r\n * @param key {String}\r\n * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name getFormObject\r\n */\r\n API.getFormObject = function(key) {\r\n var xObject = renderTargets[renderTargetMap[key]];\r\n return {\r\n x: xObject.x,\r\n y: xObject.y,\r\n width: xObject.width,\r\n height: xObject.height,\r\n matrix: xObject.matrix\r\n };\r\n };\r\n\r\n /**\r\n * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n * Uses FileSaver.js-method saveAs.\r\n *\r\n * @memberof jsPDF#\r\n * @name save\r\n * @function\r\n * @instance\r\n * @param {string} filename The filename including extension.\r\n * @param {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n * @returns {jsPDF|Promise} jsPDF-instance */\r\n API.save = function(filename, options) {\r\n filename = filename || \"generated.pdf\";\r\n\r\n options = options || {};\r\n options.returnPromise = options.returnPromise || false;\r\n\r\n if (options.returnPromise === false) {\r\n saveAs(getBlob(buildDocument()), filename);\r\n if (typeof saveAs.unload === \"function\") {\r\n if (globalObject.setTimeout) {\r\n setTimeout(saveAs.unload, 911);\r\n }\r\n }\r\n return this;\r\n } else {\r\n return new Promise(function(resolve, reject) {\r\n try {\r\n var result = saveAs(getBlob(buildDocument()), filename);\r\n if (typeof saveAs.unload === \"function\") {\r\n if (globalObject.setTimeout) {\r\n setTimeout(saveAs.unload, 911);\r\n }\r\n }\r\n resolve(result);\r\n } catch (e) {\r\n reject(e.message);\r\n }\r\n });\r\n }\r\n\r\n };\r\n\r\n // applying plugins (more methods) ON TOP of built-in API.\r\n // this is intentional as we allow plugins to override\r\n // built-ins\r\n for (var plugin in jsPDF.API) {\r\n if (jsPDF.API.hasOwnProperty(plugin)) {\r\n if (plugin === \"events\" && jsPDF.API.events.length) {\r\n (function(events, newEvents) {\r\n // jsPDF.API.events is a JS Array of Arrays\r\n // where each Array is a pair of event name, handler\r\n // Events were added by plugins to the jsPDF instantiator.\r\n // These are always added to the new instance and some ran\r\n // during instantiation.\r\n var eventname, handler_and_args, i;\r\n\r\n for (i = newEvents.length - 1; i !== -1; i--) {\r\n // subscribe takes 3 args: 'topic', function, runonce_flag\r\n // if undefined, runonce is false.\r\n // users can attach callback directly,\r\n // or they can attach an array with [callback, runonce_flag]\r\n // that's what the \"apply\" magic is for below.\r\n eventname = newEvents[i][0];\r\n handler_and_args = newEvents[i][1];\r\n events.subscribe.apply(\r\n events,\r\n [eventname].concat(\r\n typeof handler_and_args === \"function\"\r\n ? [handler_and_args]\r\n : handler_and_args\r\n )\r\n );\r\n }\r\n })(events, jsPDF.API.events);\r\n } else {\r\n API[plugin] = jsPDF.API[plugin];\r\n }\r\n }\r\n }\r\n\r\n var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n pageNumber = pageNumber || currentPage;\r\n return (\r\n (pagesContext[pageNumber].mediaBox.topRightX -\r\n pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n scaleFactor\r\n );\r\n });\r\n\r\n var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n pagesContext[pageNumber].mediaBox.topRightX =\r\n value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n });\r\n\r\n var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n pageNumber = pageNumber || currentPage;\r\n return (\r\n (pagesContext[pageNumber].mediaBox.topRightY -\r\n pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n scaleFactor\r\n );\r\n });\r\n\r\n var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n pagesContext[pageNumber].mediaBox.topRightY =\r\n value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n });\r\n\r\n /**\r\n * Object exposing internal API to plugins\r\n * @public\r\n * @ignore\r\n */\r\n API.internal = {\r\n pdfEscape: pdfEscape,\r\n getStyle: getStyle,\r\n getFont: getFontEntry,\r\n getFontSize: getFontSize,\r\n getCharSpace: getCharSpace,\r\n getTextColor: getTextColor,\r\n getLineHeight: getLineHeight,\r\n getLineHeightFactor: getLineHeightFactor,\r\n getLineWidth: getLineWidth,\r\n write: write,\r\n getHorizontalCoordinate: getHorizontalCoordinate,\r\n getVerticalCoordinate: getVerticalCoordinate,\r\n getCoordinateString: getHorizontalCoordinateString,\r\n getVerticalCoordinateString: getVerticalCoordinateString,\r\n collections: {},\r\n newObject: newObject,\r\n newAdditionalObject: newAdditionalObject,\r\n newObjectDeferred: newObjectDeferred,\r\n newObjectDeferredBegin: newObjectDeferredBegin,\r\n getFilters: getFilters,\r\n putStream: putStream,\r\n events: events,\r\n scaleFactor: scaleFactor,\r\n pageSize: {\r\n getWidth: function() {\r\n return getPageWidth(currentPage);\r\n },\r\n setWidth: function(value) {\r\n setPageWidth(currentPage, value);\r\n },\r\n getHeight: function() {\r\n return getPageHeight(currentPage);\r\n },\r\n setHeight: function(value) {\r\n setPageHeight(currentPage, value);\r\n }\r\n },\r\n encryptionOptions: encryptionOptions,\r\n encryption: encryption,\r\n getEncryptor: getEncryptor,\r\n output: output,\r\n getNumberOfPages: getNumberOfPages,\r\n pages: pages,\r\n out: out,\r\n f2: f2,\r\n f3: f3,\r\n getPageInfo: getPageInfo,\r\n getPageInfoByObjId: getPageInfoByObjId,\r\n getCurrentPageInfo: getCurrentPageInfo,\r\n getPDFVersion: getPdfVersion,\r\n Point: Point,\r\n Rectangle: Rectangle,\r\n Matrix: Matrix,\r\n hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n };\r\n\r\n Object.defineProperty(API.internal.pageSize, \"width\", {\r\n get: function() {\r\n return getPageWidth(currentPage);\r\n },\r\n set: function(value) {\r\n setPageWidth(currentPage, value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(API.internal.pageSize, \"height\", {\r\n get: function() {\r\n return getPageHeight(currentPage);\r\n },\r\n set: function(value) {\r\n setPageHeight(currentPage, value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n\r\n //////////////////////////////////////////////////////\r\n // continuing initialization of jsPDF Document object\r\n //////////////////////////////////////////////////////\r\n // Add the first page automatically\r\n addFonts.call(API, standardFonts);\r\n activeFontKey = \"F1\";\r\n _addPage(format, orientation);\r\n\r\n events.publish(\"initialized\");\r\n return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n * // 'this' will be ref to internal API object. see jsPDF source\r\n * // , so you can refer to built-in methods like so:\r\n * // this.line(....)\r\n * // this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n return value\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\(/g, \"\\\\(\")\n .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n return value\n .replace(/\\\\\\\\/g, \"\\\\\")\n .replace(/\\\\\\(/g, \"(\")\n .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n var xobj = new AcroFormXObject();\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n );\n }\n var bitMask = 1 << bitPosition;\n\n number |= bitMask;\n\n return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n );\n }\n var bitMask = 1 << bitPosition;\n\n number &= ~bitMask;\n\n return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n );\n }\n return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n );\n }\n return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n );\n }\n return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n );\n }\n return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n args,\n scope\n) {\n var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n var x = args[0];\n var y = args[1];\n var w = args[2];\n var h = args[3];\n\n var coordinates = {};\n\n coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n return [\n Number(f2(coordinates.lowerLeft_X)),\n Number(f2(coordinates.lowerLeft_Y)),\n Number(f2(coordinates.upperRight_X)),\n Number(f2(coordinates.upperRight_Y))\n ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n if (formObject.appearanceStreamContent) {\n return formObject.appearanceStreamContent;\n }\n\n if (!formObject.V && !formObject.DV) {\n return;\n }\n\n // else calculate it\n\n var stream = [];\n var text = formObject._V || formObject.DV;\n var calcRes = calculateX(formObject, text);\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n\n //PDF 32000-1:2008, page 444\n stream.push(\"/Tx BMC\");\n stream.push(\"q\");\n stream.push(\"BT\"); // Begin Text\n stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n stream.push(calcRes.text);\n stream.push(\"ET\"); // End Text\n stream.push(\"Q\");\n stream.push(\"EMC\");\n\n var appearanceStreamContent = createFormXObject(formObject);\n appearanceStreamContent.scope = formObject.scope;\n appearanceStreamContent.stream = stream.join(\"\\n\");\n return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n var maxFontSize =\n formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n var returnValue = {\n text: \"\",\n fontSize: \"\"\n };\n // Remove Brackets\n text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n text =\n text.substr(text.length - 1) == \")\"\n ? text.substr(0, text.length - 1)\n : text;\n // split into array of words\n var textSplit = text.split(\" \");\n if (formObject.multiline) {\n textSplit = textSplit.map(word => word.split(\"\\n\"));\n } else {\n textSplit = textSplit.map(word => [word]);\n }\n\n var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n var lineSpacing = 2;\n var borderPadding = 2;\n\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n height = height < 0 ? -height : height;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n width = width < 0 ? -width : width;\n\n var isSmallerThanWidth = function(i, lastLine, fontSize) {\n if (i + 1 < textSplit.length) {\n var tmp = lastLine + \" \" + textSplit[i + 1][0];\n var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n var FieldWidth = width - 2 * borderPadding;\n return TextWidth <= FieldWidth;\n } else {\n return false;\n }\n };\n\n fontSize++;\n FontSize: while (fontSize > 0) {\n text = \"\";\n fontSize--;\n var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n var startY = formObject.multiline\n ? height - fontSize\n : (height - textHeight) / 2;\n startY += lineSpacing;\n var startX;\n\n var lastY = startY;\n var firstWordInLine = 0,\n lastWordInLine = 0;\n var lastLength;\n var currWord = 0;\n\n if (fontSize <= 0) {\n // In case, the Text doesn't fit at all\n fontSize = 12;\n text = \"(...) Tj\\n\";\n text +=\n \"% Width of Text: \" +\n calculateFontSpace(text, formObject, fontSize).width +\n \", FieldWidth:\" +\n width +\n \"\\n\";\n break;\n }\n\n var lastLine = \"\";\n var lineCount = 0;\n Line: for (var i = 0; i < textSplit.length; i++) {\n if (textSplit.hasOwnProperty(i)) {\n let isWithNewLine = false;\n if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n continue FontSize;\n }\n\n lastLine += textSplit[i][currWord];\n isWithNewLine = true;\n lastWordInLine = i;\n i--;\n } else {\n lastLine += textSplit[i][currWord] + \" \";\n lastLine =\n lastLine.substr(lastLine.length - 1) == \" \"\n ? lastLine.substr(0, lastLine.length - 1)\n : lastLine;\n var key = parseInt(i);\n var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n var isLastWord = i >= textSplit.length - 1;\n\n if (nextLineIsSmaller && !isLastWord) {\n lastLine += \" \";\n currWord = 0;\n continue; // Line\n } else if (!nextLineIsSmaller && !isLastWord) {\n if (!formObject.multiline) {\n continue FontSize;\n } else {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the\n // FieldObject\n continue FontSize;\n }\n lastWordInLine = key;\n // go on\n }\n } else if (isLastWord) {\n lastWordInLine = key;\n } else {\n if (\n formObject.multiline &&\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the FieldObject\n continue FontSize;\n }\n }\n }\n // Remove last blank\n\n var line = \"\";\n\n for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n var currLine = textSplit[x];\n if (formObject.multiline) {\n if (x === lastWordInLine) {\n line += currLine[currWord] + \" \";\n currWord = (currWord + 1) % currLine.length;\n continue;\n }\n if (x === firstWordInLine) {\n line += currLine[currLine.length - 1] + \" \";\n continue;\n }\n }\n line += currLine[0] + \" \";\n }\n\n // Remove last blank\n line =\n line.substr(line.length - 1) == \" \"\n ? line.substr(0, line.length - 1)\n : line;\n // lastLength -= blankSpace.width;\n lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n // Calculate startX\n switch (formObject.textAlign) {\n case \"right\":\n startX = width - lastLength - borderPadding;\n break;\n case \"center\":\n startX = (width - lastLength) / 2;\n break;\n case \"left\":\n default:\n startX = borderPadding;\n break;\n }\n text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n // reset X in PDF\n text += -f2(startX) + \" 0 Td\\n\";\n\n // After a Line, adjust y position\n lastY = -(fontSize + lineSpacing);\n\n // Reset for next iteration step\n lastLength = 0;\n firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n lineCount++;\n\n lastLine = \"\";\n continue Line;\n }\n }\n break;\n }\n\n returnValue.text = text;\n returnValue.fontSize = fontSize;\n\n return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n var font = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n );\n var width =\n formObject.scope.getStringUnitWidth(text, {\n font: font,\n fontSize: parseFloat(fontSize),\n charSpace: 0\n }) * parseFloat(fontSize);\n var height =\n formObject.scope.getStringUnitWidth(\"3\", {\n font: font,\n fontSize: parseFloat(fontSize),\n charSpace: 0\n }) *\n parseFloat(fontSize) *\n 1.5;\n return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n fields: [],\n xForms: [],\n /**\n * acroFormDictionaryRoot contains information about the AcroForm\n * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n * 1: The Object ID of the Root\n */\n acroFormDictionaryRoot: null,\n /**\n * After the PDF gets evaluated, the reference to the root has to be\n * reset, this indicates, whether the root has already been printed\n * out\n */\n printedOut: false,\n internal: null,\n isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n //set objId to undefined and force it to get a new objId on buildDocument\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n for (var i in fields) {\n if (fields.hasOwnProperty(i)) {\n var formObject = fields[i];\n //set objId to undefined and force it to get a new objId on buildDocument\n formObject.objId = undefined;\n // add Annot Reference!\n if (formObject.hasAnnotation) {\n // If theres an Annotation Widget in the Form Object, put the\n // Reference in the /Annot array\n createAnnotationReference(formObject, scope);\n }\n }\n }\n};\n\nvar putForm = function(formObject) {\n if (formObject.scope.internal.acroformPlugin.printedOut) {\n formObject.scope.internal.acroformPlugin.printedOut = false;\n formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n }\n formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n formObject\n );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n var options = {\n type: \"reference\",\n object: object\n };\n var findEntry = function(entry) {\n return entry.type === options.type && entry.object === options.object;\n };\n if (\n scope.internal\n .getPageInfo(object.page)\n .pageContext.annotations.find(findEntry) === undefined\n ) {\n scope.internal\n .getPageInfo(object.page)\n .pageContext.annotations.push(options);\n }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n // Put reference to AcroForm to DocumentCatalog\n if (\n typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n ) {\n // for safety, shouldn't normally be the case\n scope.internal.write(\n \"/AcroForm \" +\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n \" \" +\n 0 +\n \" R\"\n );\n } else {\n throw new Error(\"putCatalogCallback: Root missing.\");\n }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n // Remove event\n scope.internal.events.unsubscribe(\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n );\n delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n var standardFields = !fieldArray;\n\n if (!fieldArray) {\n // in case there is no fieldArray specified, we want to print out\n // the Fields of the AcroForm\n // Print out Root\n scope.internal.newObjectDeferredBegin(\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n true\n );\n scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n }\n\n fieldArray =\n fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var fieldObject = fieldArray[i];\n var keyValueList = [];\n var oldRect = fieldObject.Rect;\n\n if (fieldObject.Rect) {\n fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n }\n\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n fieldObject\n );\n\n if (\n typeof fieldObject === \"object\" &&\n typeof fieldObject.getKeyValueListForStream === \"function\"\n ) {\n keyValueList = fieldObject.getKeyValueListForStream();\n }\n\n fieldObject.Rect = oldRect;\n\n if (\n fieldObject.hasAppearanceStream &&\n !fieldObject.appearanceStreamContent\n ) {\n // Calculate Appearance\n var appearance = calculateAppearanceStream(fieldObject);\n keyValueList.push({ key: \"AP\", value: \"<>\" });\n\n scope.internal.acroformPlugin.xForms.push(appearance);\n }\n\n // Assume AppearanceStreamContent is a Array with N,R,D (at least\n // one of them!)\n if (fieldObject.appearanceStreamContent) {\n var appearanceStreamString = \"\";\n // Iterate over N,R and D\n for (var k in fieldObject.appearanceStreamContent) {\n if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n var value = fieldObject.appearanceStreamContent[k];\n appearanceStreamString += \"/\" + k + \" \";\n appearanceStreamString += \"<<\";\n if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n // appearanceStream is an Array or Object!\n for (var i in value) {\n if (value.hasOwnProperty(i)) {\n var obj = value[i];\n if (typeof obj === \"function\") {\n // if Function is referenced, call it in order\n // to get the FormXObject\n obj = obj.call(scope, fieldObject);\n }\n appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n // In case the XForm is already used, e.g. OffState\n // of CheckBoxes, don't add it\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n }\n } else {\n obj = value;\n if (typeof obj === \"function\") {\n // if Function is referenced, call it in order to\n // get the FormXObject\n obj = obj.call(scope, fieldObject);\n }\n appearanceStreamString += \"/\" + i + \" \" + obj;\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n appearanceStreamString += \">>\";\n }\n }\n\n // appearance stream is a normal Object..\n keyValueList.push({\n key: \"AP\",\n value: \"<<\\n\" + appearanceStreamString + \">>\"\n });\n }\n\n scope.internal.putStream({\n additionalKeyValues: keyValueList,\n objectId: fieldObject.objId\n });\n\n scope.internal.out(\"endobj\");\n }\n }\n if (standardFields) {\n createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var key = i;\n var fieldObject = fieldArray[i];\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n if (\n typeof fieldObject === \"object\" &&\n typeof fieldObject.putStream === \"function\"\n ) {\n fieldObject.putStream();\n }\n delete fieldArray[key];\n }\n }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n formObject.scope = scope;\n if (\n scope.internal !== undefined &&\n (scope.internal.acroformPlugin === undefined ||\n scope.internal.acroformPlugin.isInitialized === false)\n ) {\n AcroFormField.FieldNum = 0;\n scope.internal.acroformPlugin = JSON.parse(\n JSON.stringify(acroformPluginTemplate)\n );\n if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n throw new Error(\"Exception while creating AcroformDictionary\");\n }\n scaleFactor = scope.internal.scaleFactor;\n // The Object Number of the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n // add Callback for creating the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n \"postPutResources\",\n function() {\n AcroFormDictionaryCallback(scope);\n }\n );\n\n scope.internal.events.subscribe(\"buildDocument\", function() {\n annotReferenceCallback(scope);\n }); // buildDocument\n\n // Register event, that is triggered when the DocumentCatalog is\n // written, in order to add /AcroForm\n\n scope.internal.events.subscribe(\"putCatalog\", function() {\n putCatalogCallback(scope);\n });\n\n // Register event, that creates all Fields\n scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n createFieldCallback(fieldArray, scope);\n });\n\n scope.internal.acroformPlugin.isInitialized = true;\n }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n array,\n objId,\n scope\n) {\n var encryptor = function(data) {\n return data;\n };\n if (Array.isArray(array)) {\n var content = \"[\";\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n content += \" \";\n }\n switch (typeof array[i]) {\n case \"boolean\":\n case \"number\":\n case \"object\":\n content += array[i].toString();\n break;\n case \"string\":\n if (array[i].substr(0, 1) !== \"/\") {\n if (typeof objId !== \"undefined\" && scope)\n encryptor = scope.internal.getEncryptor(objId);\n content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n } else {\n content += array[i].toString();\n }\n break;\n }\n }\n content += \"]\";\n return content;\n }\n throw new Error(\n \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n );\n});\nfunction getMatches(string, regex, index) {\n index || (index = 1); // default to the first capturing group\n var matches = [];\n var match;\n while ((match = regex.exec(string))) {\n matches.push(match[index]);\n }\n return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n var result = [];\n if (typeof array === \"string\") {\n result = getMatches(array, /\\((.*?)\\)/g);\n }\n return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n var encryptor = function(data) {\n return data;\n };\n if (typeof objId !== \"undefined\" && scope)\n encryptor = scope.internal.getEncryptor(objId);\n string = string || \"\";\n string.toString();\n string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n this._objId = undefined;\n this._scope = undefined;\n\n /**\n * @name AcroFormPDFObject#objId\n * @type {any}\n */\n Object.defineProperty(this, \"objId\", {\n get: function() {\n if (typeof this._objId === \"undefined\") {\n if (typeof this.scope === \"undefined\") {\n return undefined;\n }\n this._objId = this.scope.internal.newObjectDeferred();\n }\n return this._objId;\n },\n set: function(value) {\n this._objId = value;\n }\n });\n Object.defineProperty(this, \"scope\", {\n value: this._scope,\n writable: true\n });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n var keyValueList = this.getKeyValueListForStream();\n this.scope.internal.putStream({\n data: this.stream,\n additionalKeyValues: keyValueList,\n objectId: this.objId\n });\n this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n var keyValueList = [];\n var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n return (\n key != \"content\" &&\n key != \"appearanceStreamContent\" &&\n key != \"scope\" &&\n key != \"objId\" &&\n key.substring(0, 1) != \"_\"\n );\n });\n\n for (var i in keys) {\n if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n var key = keys[i];\n var value = this[key];\n\n if (value) {\n if (Array.isArray(value)) {\n keyValueList.push({\n key: key,\n value: arrayToPdfArray(value, this.objId, this.scope)\n });\n } else if (value instanceof AcroFormPDFObject) {\n // In case it is a reference to another PDFObject,\n // take the reference number\n value.scope = this.scope;\n keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n } else if (typeof value !== \"function\") {\n keyValueList.push({ key: key, value: value });\n }\n }\n }\n }\n return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n AcroFormPDFObject.call(this);\n\n Object.defineProperty(this, \"Type\", {\n value: \"/XObject\",\n configurable: false,\n writable: true\n });\n\n Object.defineProperty(this, \"Subtype\", {\n value: \"/Form\",\n configurable: false,\n writable: true\n });\n\n Object.defineProperty(this, \"FormType\", {\n value: 1,\n configurable: false,\n writable: true\n });\n\n var _BBox = [];\n Object.defineProperty(this, \"BBox\", {\n configurable: false,\n get: function() {\n return _BBox;\n },\n set: function(value) {\n _BBox = value;\n }\n });\n\n Object.defineProperty(this, \"Resources\", {\n value: \"2 0 R\",\n configurable: false,\n writable: true\n });\n\n var _stream;\n Object.defineProperty(this, \"stream\", {\n enumerable: false,\n configurable: true,\n set: function(value) {\n _stream = value.trim();\n },\n get: function() {\n if (_stream) {\n return _stream;\n } else {\n return null;\n }\n }\n });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n AcroFormPDFObject.call(this);\n\n var _Kids = [];\n\n Object.defineProperty(this, \"Kids\", {\n enumerable: false,\n configurable: true,\n get: function() {\n if (_Kids.length > 0) {\n return _Kids;\n } else {\n return undefined;\n }\n }\n });\n Object.defineProperty(this, \"Fields\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _Kids;\n }\n });\n\n // Default Appearance\n var _DA;\n Object.defineProperty(this, \"DA\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_DA) {\n return undefined;\n }\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n },\n set: function(value) {\n _DA = value;\n }\n });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n AcroFormPDFObject.call(this);\n\n //Annotation-Flag See Table 165\n var _F = 4;\n Object.defineProperty(this, \"F\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _F;\n },\n set: function(value) {\n if (!isNaN(value)) {\n _F = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute F supplied.'\n );\n }\n }\n });\n\n /**\n * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n *\n * @name AcroFormField#showWhenPrinted\n * @default true\n * @type {boolean}\n */\n Object.defineProperty(this, \"showWhenPrinted\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(_F, 3));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.F = setBitForPdf(_F, 3);\n } else {\n this.F = clearBitForPdf(_F, 3);\n }\n }\n });\n\n var _Ff = 0;\n Object.defineProperty(this, \"Ff\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _Ff;\n },\n set: function(value) {\n if (!isNaN(value)) {\n _Ff = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute Ff supplied.'\n );\n }\n }\n });\n\n var _Rect = [];\n Object.defineProperty(this, \"Rect\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (_Rect.length === 0) {\n return undefined;\n }\n return _Rect;\n },\n set: function(value) {\n if (typeof value !== \"undefined\") {\n _Rect = value;\n } else {\n _Rect = [];\n }\n }\n });\n\n /**\n * The x-position of the field.\n *\n * @name AcroFormField#x\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"x\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[0])) {\n return 0;\n }\n return _Rect[0];\n },\n set: function(value) {\n _Rect[0] = value;\n }\n });\n\n /**\n * The y-position of the field.\n *\n * @name AcroFormField#y\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"y\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[1])) {\n return 0;\n }\n return _Rect[1];\n },\n set: function(value) {\n _Rect[1] = value;\n }\n });\n\n /**\n * The width of the field.\n *\n * @name AcroFormField#width\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"width\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[2])) {\n return 0;\n }\n return _Rect[2];\n },\n set: function(value) {\n _Rect[2] = value;\n }\n });\n\n /**\n * The height of the field.\n *\n * @name AcroFormField#height\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"height\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[3])) {\n return 0;\n }\n return _Rect[3];\n },\n set: function(value) {\n _Rect[3] = value;\n }\n });\n\n var _FT = \"\";\n Object.defineProperty(this, \"FT\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _FT;\n },\n set: function(value) {\n switch (value) {\n case \"/Btn\":\n case \"/Tx\":\n case \"/Ch\":\n case \"/Sig\":\n _FT = value;\n break;\n default:\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute FT supplied.'\n );\n }\n }\n });\n\n var _T = null;\n\n Object.defineProperty(this, \"T\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (!_T || _T.length < 1) {\n // In case of a Child from a Radio´Group, you don't need a FieldName\n if (this instanceof AcroFormChildClass) {\n return undefined;\n }\n _T = \"FieldObject\" + AcroFormField.FieldNum++;\n }\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n },\n set: function(value) {\n _T = value.toString();\n }\n });\n\n /**\n * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n *\n * @name AcroFormField#fieldName\n * @default null\n * @type {string}\n */\n Object.defineProperty(this, \"fieldName\", {\n configurable: true,\n enumerable: true,\n get: function() {\n return _T;\n },\n set: function(value) {\n _T = value;\n }\n });\n\n var _fontName = \"helvetica\";\n /**\n * The fontName of the font to be used.\n *\n * @name AcroFormField#fontName\n * @default 'helvetica'\n * @type {string}\n */\n Object.defineProperty(this, \"fontName\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontName;\n },\n set: function(value) {\n _fontName = value;\n }\n });\n\n var _fontStyle = \"normal\";\n /**\n * The fontStyle of the font to be used.\n *\n * @name AcroFormField#fontStyle\n * @default 'normal'\n * @type {string}\n */\n Object.defineProperty(this, \"fontStyle\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontStyle;\n },\n set: function(value) {\n _fontStyle = value;\n }\n });\n\n var _fontSize = 0;\n /**\n * The fontSize of the font to be used.\n *\n * @name AcroFormField#fontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, \"fontSize\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontSize;\n },\n set: function(value) {\n _fontSize = value;\n }\n });\n\n var _maxFontSize = undefined;\n /**\n * The maximum fontSize of the font to be used.\n *\n * @name AcroFormField#maxFontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, \"maxFontSize\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (_maxFontSize === undefined) {\n // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n return 50 / scaleFactor;\n } else {\n return _maxFontSize;\n }\n },\n set: function(value) {\n _maxFontSize = value;\n }\n });\n\n var _color = \"black\";\n /**\n * The color of the text\n *\n * @name AcroFormField#color\n * @default 'black'\n * @type {string|rgba}\n */\n Object.defineProperty(this, \"color\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _color;\n },\n set: function(value) {\n _color = value;\n }\n });\n\n var _DA = \"/F1 0 Tf 0 g\";\n // Defines the default appearance (Needed for variable Text)\n Object.defineProperty(this, \"DA\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (\n !_DA ||\n this instanceof AcroFormChildClass ||\n this instanceof AcroFormTextField\n ) {\n return undefined;\n }\n return toPdfString(_DA, this.objId, this.scope);\n },\n set: function(value) {\n value = value.toString();\n _DA = value;\n }\n });\n\n var _DV = null;\n Object.defineProperty(this, \"DV\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_DV) {\n return undefined;\n }\n if (this instanceof AcroFormButton === false) {\n return toPdfString(_DV, this.objId, this.scope);\n }\n return _DV;\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === false) {\n if (value.substr(0, 1) === \"(\") {\n _DV = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _DV = pdfUnescape(value);\n }\n } else {\n _DV = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n *\n * @name AcroFormField#defaultValue\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, \"defaultValue\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (this instanceof AcroFormButton === true) {\n return pdfUnescape(_DV.substr(1, _DV.length - 1));\n } else {\n return _DV;\n }\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === true) {\n _DV = \"/\" + value;\n } else {\n _DV = value;\n }\n }\n });\n\n var _V = null;\n Object.defineProperty(this, \"_V\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_V) {\n return undefined;\n }\n return _V;\n },\n set: function(value) {\n this.V = value;\n }\n });\n Object.defineProperty(this, \"V\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_V) {\n return undefined;\n }\n if (this instanceof AcroFormButton === false) {\n return toPdfString(_V, this.objId, this.scope);\n }\n return _V;\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === false) {\n if (value.substr(0, 1) === \"(\") {\n _V = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _V = pdfUnescape(value);\n }\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n *\n * @name AcroFormField#value\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, \"value\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (this instanceof AcroFormButton === true) {\n return pdfUnescape(_V.substr(1, _V.length - 1));\n } else {\n return _V;\n }\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === true) {\n _V = \"/\" + value;\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * Check if field has annotations\n *\n * @name AcroFormField#hasAnnotation\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, \"hasAnnotation\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return this.Rect;\n }\n });\n\n Object.defineProperty(this, \"Type\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return this.hasAnnotation ? \"/Annot\" : null;\n }\n });\n\n Object.defineProperty(this, \"Subtype\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return this.hasAnnotation ? \"/Widget\" : null;\n }\n });\n\n var _hasAppearanceStream = false;\n /**\n * true if field has an appearanceStream\n *\n * @name AcroFormField#hasAppearanceStream\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _hasAppearanceStream;\n },\n set: function(value) {\n value = Boolean(value);\n _hasAppearanceStream = value;\n }\n });\n\n /**\n * The page on which the AcroFormField is placed\n *\n * @name AcroFormField#page\n * @type {number}\n */\n var _page;\n Object.defineProperty(this, \"page\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_page) {\n return undefined;\n }\n return _page;\n },\n set: function(value) {\n _page = value;\n }\n });\n\n /**\n * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n *\n * @name AcroFormField#readOnly\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"readOnly\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 1));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 1);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 1);\n }\n }\n });\n\n /**\n * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n *\n * @name AcroFormField#required\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"required\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 2));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 2);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 2);\n }\n }\n });\n\n /**\n * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n *\n * @name AcroFormField#noExport\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"noExport\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 3));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 3);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 3);\n }\n }\n });\n\n var _Q = null;\n Object.defineProperty(this, \"Q\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (_Q === null) {\n return undefined;\n }\n return _Q;\n },\n set: function(value) {\n if ([0, 1, 2].indexOf(value) !== -1) {\n _Q = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute Q supplied.'\n );\n }\n }\n });\n\n /**\n * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n * 'left', 'center', 'right'\n *\n * @name AcroFormField#textAlign\n * @default 'left'\n * @type {string}\n */\n Object.defineProperty(this, \"textAlign\", {\n get: function() {\n var result;\n switch (_Q) {\n case 0:\n default:\n result = \"left\";\n break;\n case 1:\n result = \"center\";\n break;\n case 2:\n result = \"right\";\n break;\n }\n return result;\n },\n configurable: true,\n enumerable: true,\n set: function(value) {\n switch (value) {\n case \"right\":\n case 2:\n _Q = 2;\n break;\n case \"center\":\n case 1:\n _Q = 1;\n break;\n case \"left\":\n case 0:\n default:\n _Q = 0;\n }\n }\n });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n AcroFormField.call(this);\n // Field Type = Choice Field\n this.FT = \"/Ch\";\n // options\n this.V = \"()\";\n\n this.fontName = \"zapfdingbats\";\n // Top Index\n var _TI = 0;\n\n Object.defineProperty(this, \"TI\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _TI;\n },\n set: function(value) {\n _TI = value;\n }\n });\n\n /**\n * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n *\n * @name AcroFormChoiceField#topIndex\n * @default 0\n * @type {number}\n */\n Object.defineProperty(this, \"topIndex\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _TI;\n },\n set: function(value) {\n _TI = value;\n }\n });\n\n var _Opt = [];\n Object.defineProperty(this, \"Opt\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return arrayToPdfArray(_Opt, this.objId, this.scope);\n },\n set: function(value) {\n _Opt = pdfArrayToStringArray(value);\n }\n });\n\n /**\n * @memberof AcroFormChoiceField\n * @name getOptions\n * @function\n * @instance\n * @returns {array} array of Options\n */\n this.getOptions = function() {\n return _Opt;\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name setOptions\n * @function\n * @instance\n * @param {array} value\n */\n this.setOptions = function(value) {\n _Opt = value;\n if (this.sort) {\n _Opt.sort();\n }\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name addOption\n * @function\n * @instance\n * @param {string} value\n */\n this.addOption = function(value) {\n value = value || \"\";\n value = value.toString();\n _Opt.push(value);\n if (this.sort) {\n _Opt.sort();\n }\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name removeOption\n * @function\n * @instance\n * @param {string} value\n * @param {boolean} allEntries (default: false)\n */\n this.removeOption = function(value, allEntries) {\n allEntries = allEntries || false;\n value = value || \"\";\n value = value.toString();\n\n while (_Opt.indexOf(value) !== -1) {\n _Opt.splice(_Opt.indexOf(value), 1);\n if (allEntries === false) {\n break;\n }\n }\n };\n\n /**\n * If set, the field is a combo box; if clear, the field is a list box.\n *\n * @name AcroFormChoiceField#combo\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"combo\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 18));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 18);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 18);\n }\n }\n });\n\n /**\n * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n *\n * @name AcroFormChoiceField#edit\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"edit\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 19));\n },\n set: function(value) {\n //PDF 32000-1:2008, page 444\n if (this.combo === true) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 19);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 19);\n }\n }\n }\n });\n\n /**\n * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n *\n * @name AcroFormChoiceField#sort\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"sort\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 20));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 20);\n _Opt.sort();\n } else {\n this.Ff = clearBitForPdf(this.Ff, 20);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n *\n * @name AcroFormChoiceField#multiSelect\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"multiSelect\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 22));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 22);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 22);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n *\n * @name AcroFormChoiceField#doNotSpellCheck\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n *\n * @name AcroFormChoiceField#commitOnSelChange\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"commitOnSelChange\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 27));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 27);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 27);\n }\n }\n });\n\n this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n AcroFormChoiceField.call(this);\n this.fontName = \"helvetica\";\n\n //PDF 32000-1:2008, page 444\n this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n AcroFormListBox.call(this);\n this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n AcroFormComboBox.call(this);\n this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n AcroFormField.call(this);\n this.FT = \"/Btn\";\n\n /**\n * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n *\n * @name AcroFormButton#noToggleToOff\n * @type {boolean}\n */\n Object.defineProperty(this, \"noToggleToOff\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 15));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 15);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 15);\n }\n }\n });\n\n /**\n * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n *\n * @name AcroFormButton#radio\n * @type {boolean}\n */\n Object.defineProperty(this, \"radio\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 16));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 16);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 16);\n }\n }\n });\n\n /**\n * If set, the field is a pushbutton that does not retain a permanent value.\n *\n * @name AcroFormButton#pushButton\n * @type {boolean}\n */\n Object.defineProperty(this, \"pushButton\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 17));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 17);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 17);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n *\n * @name AcroFormButton#radioIsUnison\n * @type {boolean}\n */\n Object.defineProperty(this, \"radioIsUnison\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: false,\n configurable: false,\n get: function() {\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n if (Object.keys(_MK).length !== 0) {\n var result = [];\n result.push(\"<<\");\n var key;\n for (key in _MK) {\n result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n }\n result.push(\">>\");\n return result.join(\"\\n\");\n }\n return undefined;\n },\n set: function(value) {\n if (typeof value === \"object\") {\n _MK = value;\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross,\n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, \"caption\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MK.CA || \"\";\n },\n set: function(value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, \"AS\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _AS;\n },\n set: function(value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, \"appearanceState\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function(value) {\n _AS = \"/\" + value;\n }\n });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n AcroFormButton.call(this);\n this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n AcroFormButton.call(this);\n this.radio = true;\n this.pushButton = false;\n\n var _Kids = [];\n Object.defineProperty(this, \"Kids\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _Kids;\n },\n set: function(value) {\n if (typeof value !== \"undefined\") {\n _Kids = value;\n } else {\n _Kids = [];\n }\n }\n });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n AcroFormField.call(this);\n\n var _parent;\n Object.defineProperty(this, \"Parent\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _parent;\n },\n set: function(value) {\n _parent = value;\n }\n });\n\n var _optionName;\n Object.defineProperty(this, \"optionName\", {\n enumerable: false,\n configurable: true,\n get: function() {\n return _optionName;\n },\n set: function(value) {\n _optionName = value;\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: false,\n configurable: false,\n get: function() {\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n var result = [];\n result.push(\"<<\");\n var key;\n for (key in _MK) {\n result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n }\n result.push(\">>\");\n return result.join(\"\\n\");\n },\n set: function(value) {\n if (typeof value === \"object\") {\n _MK = value;\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross,\n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, \"caption\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MK.CA || \"\";\n },\n set: function(value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, \"AS\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _AS;\n },\n set: function(value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, \"appearanceState\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function(value) {\n _AS = \"/\" + value;\n }\n });\n this.caption = \"l\";\n this.appearanceState = \"Off\";\n // todo: set AppearanceType as variable that can be set from the\n // outside...\n this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n // The Default appearanceType is the Circle\n this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n this.optionName\n );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n throw new Error(\n \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n );\n }\n for (var objId in this.Kids) {\n if (this.Kids.hasOwnProperty(objId)) {\n var child = this.Kids[objId];\n child.appearanceStreamContent = appearance.createAppearanceStream(\n child.optionName\n );\n child.caption = appearance.getCA();\n }\n }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n // Create new Child for RadioGroup\n var child = new AcroFormChildClass();\n child.Parent = this;\n child.optionName = name;\n // Add to Parent\n this.Kids.push(child);\n\n addField.call(this.scope, child);\n\n return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n AcroFormButton.call(this);\n\n this.fontName = \"zapfdingbats\";\n this.caption = \"3\";\n this.appearanceState = \"On\";\n this.value = \"On\";\n this.textAlign = \"center\";\n this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n AcroFormField.call(this);\n this.FT = \"/Tx\";\n\n /**\n * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n *\n * @name AcroFormTextField#multiline\n * @type {boolean}\n */\n Object.defineProperty(this, \"multiline\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 13));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 13);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 13);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n *\n * @name AcroFormTextField#fileSelect\n * @type {boolean}\n */\n Object.defineProperty(this, \"fileSelect\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 21));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 21);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 21);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n *\n * @name AcroFormTextField#doNotSpellCheck\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n *\n * @name AcroFormTextField#doNotScroll\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotScroll\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 24));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 24);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 24);\n }\n }\n });\n\n /**\n * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n *\n * @name AcroFormTextField#comb\n * @type {boolean}\n */\n Object.defineProperty(this, \"comb\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 25));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 25);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 25);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n *\n * @name AcroFormTextField#richText\n * @type {boolean}\n */\n Object.defineProperty(this, \"richText\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MaxLen = null;\n Object.defineProperty(this, \"MaxLen\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _MaxLen;\n },\n set: function(value) {\n _MaxLen = value;\n }\n });\n\n /**\n * (Optional; inheritable) The maximum length of the field’s text, in characters.\n *\n * @name AcroFormTextField#maxLength\n * @type {number}\n */\n Object.defineProperty(this, \"maxLength\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MaxLen;\n },\n set: function(value) {\n if (Number.isInteger(value)) {\n _MaxLen = value;\n }\n }\n });\n\n Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return this.V || this.DV;\n }\n });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n AcroFormTextField.call(this);\n\n /**\n * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n *\n * @name AcroFormTextField#password\n * @type {boolean}\n */\n Object.defineProperty(this, \"password\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 14));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 14);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 14);\n }\n }\n });\n this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n CheckBox: {\n createAppearanceStream: function() {\n var appearance = {\n N: {\n On: AcroFormAppearance.CheckBox.YesNormal\n },\n D: {\n On: AcroFormAppearance.CheckBox.YesPushDown,\n Off: AcroFormAppearance.CheckBox.OffPushDown\n }\n };\n\n return appearance;\n },\n /**\n * Returns the standard On Appearance for a CheckBox\n *\n * @returns {AcroFormXObject}\n */\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n stream.push(\"BMC\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\n \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n );\n stream.push(\"BT\");\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n stream.push(\"EMC\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var stream = [];\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"1 g\");\n stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(\"0 g\");\n stream.push(\"BT\");\n stream.push(\n \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n );\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n /**\n * Returns the standard Off Appearance for a CheckBox\n *\n * @returns {AcroFormXObject}\n */\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n RadioButton: {\n Circle: {\n createAppearanceStream: function(name) {\n var appearanceStreamContent = {\n D: {\n Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] =\n AcroFormAppearance.RadioButton.Circle.YesNormal;\n appearanceStreamContent.D[name] =\n AcroFormAppearance.RadioButton.Circle.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function() {\n return \"l\";\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n // Make the Radius of the Circle relative to min(height, width) of formObject\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n var c = AcroFormAppearance.internal.Bezier_C;\n var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n /*\n * The Following is a Circle created with Bezier-Curves.\n */\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(DotRadius + \" 0 m\");\n stream.push(\n DotRadius +\n \" \" +\n DotRadiusBezier +\n \" \" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" 0 \" +\n DotRadius +\n \" c\"\n );\n stream.push(\n \"-\" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\n \"-\" +\n DotRadius +\n \" -\" +\n DotRadiusBezier +\n \" -\" +\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" 0 -\" +\n DotRadius +\n \" c\"\n );\n stream.push(\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n var dc = Number(\n (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n );\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\n \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n );\n stream.push(\n \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n );\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n stream.push(\"0 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(DotRadius + \" 0 m\");\n stream.push(\n \"\" +\n DotRadius +\n \" \" +\n dc +\n \" \" +\n dc +\n \" \" +\n DotRadius +\n \" 0 \" +\n DotRadius +\n \" c\"\n );\n stream.push(\n \"-\" +\n dc +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadius +\n \" \" +\n dc +\n \" -\" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\n \"-\" +\n DotRadius +\n \" -\" +\n dc +\n \" -\" +\n dc +\n \" -\" +\n DotRadius +\n \" 0 -\" +\n DotRadius +\n \" c\"\n );\n stream.push(\n dc +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadius +\n \" -\" +\n dc +\n \" \" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\n \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n );\n stream.push(\n \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n );\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n Cross: {\n /**\n * Creates the Actual AppearanceDictionary-References\n *\n * @param {string} name\n * @returns {Object}\n * @ignore\n */\n createAppearanceStream: function(name) {\n var appearanceStreamContent = {\n D: {\n Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] =\n AcroFormAppearance.RadioButton.Cross.YesNormal;\n appearanceStreamContent.D[name] =\n AcroFormAppearance.RadioButton.Cross.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function() {\n return \"8\";\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n stream.push(\"q\");\n stream.push(\n \"1 1 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n \" re\"\n );\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\n \"1 1 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n \" re\"\n );\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n }\n },\n\n /**\n * Returns the standard Appearance\n *\n * @returns {AcroFormXObject}\n */\n createDefaultAppearanceStream: function(formObject) {\n // Set Helvetica to Standard Font (size: auto)\n // Color: Black\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var fontSize = formObject.fontSize;\n var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n return result;\n }\n};\n\nAcroFormAppearance.internal = {\n Bezier_C: 0.551915024494,\n\n calculateCross: function(formObject) {\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var a = Math.min(width, height);\n\n var cross = {\n x1: {\n // upperLeft\n x: (width - a) / 2,\n y: (height - a) / 2 + a // height - borderPadding\n },\n x2: {\n // lowerRight\n x: (width - a) / 2 + a,\n y: (height - a) / 2 // borderPadding\n },\n x3: {\n // lowerLeft\n x: (width - a) / 2,\n y: (height - a) / 2 // borderPadding\n },\n x4: {\n // upperRight\n x: (width - a) / 2 + a,\n y: (height - a) / 2 + a // height - borderPadding\n }\n };\n\n return cross;\n }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[2]);\n }\n return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[3]);\n }\n return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n initializeAcroForm(this, fieldObject);\n\n if (fieldObject instanceof AcroFormField) {\n putForm(fieldObject);\n } else {\n throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n }\n fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n AcroForm,\n AcroFormChoiceField,\n AcroFormListBox,\n AcroFormComboBox,\n AcroFormEditBox,\n AcroFormButton,\n AcroFormPushButton,\n AcroFormRadioButton,\n AcroFormCheckBox,\n AcroFormTextField,\n AcroFormPasswordField,\n AcroFormAppearance\n};\n","function toLookup(arr) {\n return arr.reduce(function(lookup, name, index) {\n lookup[name] = index;\n\n return lookup;\n }, {});\n}\n\nvar fontStyleOrder = {\n italic: [\"italic\", \"oblique\", \"normal\"],\n oblique: [\"oblique\", \"italic\", \"normal\"],\n normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n \"ultra-condensed\",\n \"extra-condensed\",\n \"condensed\",\n \"semi-condensed\",\n \"normal\",\n \"semi-expanded\",\n \"expanded\",\n \"extra-expanded\",\n \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n stretch = stretch || \"normal\";\n\n return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n style = style || \"normal\";\n\n return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n if (!weight) {\n return 400;\n }\n\n if (typeof weight === \"number\") {\n // Ignore values which aren't valid font-weights.\n return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n }\n\n if (/^\\d00$/.test(weight)) {\n return parseInt(weight);\n }\n\n switch (weight) {\n case \"bold\":\n return 700;\n\n case \"normal\":\n default:\n return 400;\n }\n}\n\nexport function normalizeFontFace(fontFace) {\n var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n var style = normalizeFontStyle(fontFace.style);\n var weight = normalizeFontWeight(fontFace.weight);\n var stretch = normalizeFontStretch(fontFace.stretch);\n\n return {\n family: family,\n style: style,\n weight: weight,\n stretch: stretch,\n src: fontFace.src || [],\n\n // The ref property maps this font-face to the font\n // added by the .addFont() method.\n ref: fontFace.ref || {\n name: family,\n style: [stretch, style, weight].join(\" \")\n }\n };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n var map = {};\n\n for (var i = 0; i < fontFaces.length; ++i) {\n var normalized = normalizeFontFace(fontFaces[i]);\n\n var name = normalized.family;\n var stretch = normalized.stretch;\n var style = normalized.style;\n var weight = normalized.weight;\n\n map[name] = map[name] || {};\n\n map[name][stretch] = map[name][stretch] || {};\n map[name][stretch][style] = map[name][stretch][style] || {};\n map[name][stretch][style][weight] = normalized;\n }\n\n return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n var i;\n\n for (i = pivot; i >= 0 && i < order.length; i += dir) {\n if (matchingSet[order[i]]) {\n return matchingSet[order[i]];\n }\n }\n\n for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n if (matchingSet[order[i]]) {\n return matchingSet[order[i]];\n }\n }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n if (matchingSet[stretch]) {\n return matchingSet[stretch];\n }\n\n var pivot = fontStretchLookup[stretch];\n\n // If the font-stretch value is normal or more condensed, we want to\n // start with a descending search, otherwise we should do ascending.\n var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n if (!match) {\n // Since a font-family cannot exist without having at least one stretch value\n // we should never reach this point.\n throw new Error(\n \"Could not find a matching font-stretch value for \" + stretch\n );\n }\n\n return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n if (matchingSet[fontStyle]) {\n return matchingSet[fontStyle];\n }\n\n var ordering = fontStyleOrder[fontStyle];\n\n for (var i = 0; i < ordering.length; ++i) {\n if (matchingSet[ordering[i]]) {\n return matchingSet[ordering[i]];\n }\n }\n\n // Since a font-family cannot exist without having at least one style value\n // we should never reach this point.\n throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n if (matchingSet[weight]) {\n return matchingSet[weight];\n }\n\n if (weight === 400 && matchingSet[500]) {\n return matchingSet[500];\n }\n\n if (weight === 500 && matchingSet[400]) {\n return matchingSet[400];\n }\n\n var pivot = fontWeightsLookup[weight];\n\n // If the font-stretch value is normal or more condensed, we want to\n // start with a descending search, otherwise we should do ascending.\n var dir = weight < 400 ? -1 : 1;\n var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n if (!match) {\n // Since a font-family cannot exist without having at least one stretch value\n // we should never reach this point.\n throw new Error(\n \"Could not find a matching font-weight for value \" + weight\n );\n }\n\n return match;\n}\n\nvar defaultGenericFontFamilies = {\n \"sans-serif\": \"helvetica\",\n fixed: \"courier\",\n monospace: \"courier\",\n terminal: \"courier\",\n cursive: \"times\",\n fantasy: \"times\",\n serif: \"times\"\n};\n\nvar systemFonts = {\n caption: \"times\",\n icon: \"times\",\n menu: \"times\",\n \"message-box\": \"times\",\n \"small-caption\": \"times\",\n \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n opts = opts || {};\n\n var defaultFontFamily = opts.defaultFontFamily || \"times\";\n var genericFontFamilies = Object.assign(\n {},\n defaultGenericFontFamilies,\n opts.genericFontFamilies || {}\n );\n\n var rule = null;\n var matches = null;\n\n for (var i = 0; i < rules.length; ++i) {\n rule = normalizeFontFace(rules[i]);\n\n if (genericFontFamilies[rule.family]) {\n rule.family = genericFontFamilies[rule.family];\n }\n\n if (fontFaceMap.hasOwnProperty(rule.family)) {\n matches = fontFaceMap[rule.family];\n\n break;\n }\n }\n\n // Always fallback to a known font family.\n matches = matches || fontFaceMap[defaultFontFamily];\n\n if (!matches) {\n // At this point we should definitiely have a font family, but if we\n // don't there is something wrong with our configuration\n throw new Error(\n \"Could not find a font-family for the rule '\" +\n ruleToString(rule) +\n \"' and default family '\" +\n defaultFontFamily +\n \"'.\"\n );\n }\n\n matches = resolveFontStretch(rule.stretch, matches);\n matches = resolveFontStyle(rule.style, matches);\n matches = resolveFontWeight(rule.weight, matches);\n\n if (!matches) {\n // We should've fount\n throw new Error(\n \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n );\n }\n\n return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n var index = 0;\n\n while (index < input.length) {\n var current = input.charAt(index);\n\n if (current === quote) {\n return [input.substring(0, index), input.substring(index + 1)];\n }\n\n index += 1;\n }\n\n // Unexpected end of input\n return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n //\n // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n //\n // Breakdown of regexp:\n // -[a-z_] - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n // [a-z_] - allow a-z and underscore at beginning of input\n // [a-z0-9_-]* - after that, anything goes\n var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n // non quoted value contains illegal characters\n if (match === null) {\n return null;\n }\n\n return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n var result = [];\n var ch, parsed;\n var remaining = input.trim();\n\n if (remaining === \"\") {\n return defaultFont;\n }\n\n if (remaining in systemFonts) {\n return [systemFonts[remaining]];\n }\n\n while (remaining !== \"\") {\n parsed = null;\n remaining = eatWhiteSpace(remaining);\n ch = remaining.charAt(0);\n\n switch (ch) {\n case '\"':\n case \"'\":\n parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n break;\n\n default:\n parsed = parseNonQuotedFontFamily(remaining);\n break;\n }\n\n if (parsed === null) {\n return defaultFont;\n }\n\n result.push(parsed[0]);\n\n remaining = eatWhiteSpace(parsed[1]);\n\n // We expect end of input or a comma separator here\n if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n return defaultFont;\n }\n\n remaining = remaining.replace(/^,/, \"\");\n }\n\n return result;\n}\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n * 2013 Chris Dowling, https://github.com/gingerchris\n * 2013 Trinh Ho, https://github.com/ineedfat\n * 2013 Edwin Alejandro Perez, https://github.com/eaparango\n * 2013 Norah Smith, https://github.com/burnburnrocket\n * 2014 Diego Casorran, https://github.com/diegocr\n * 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var namespace = \"addImage_\";\n jsPDFAPI.__addimage__ = {};\n\n var UNKNOWN = \"UNKNOWN\";\n\n // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n // With too small batch iteration will be slow as more calls are made,\n // higher values cause larger and slower garbage collection.\n var ARRAY_APPLY_BATCH = 8192;\n\n var imageFileTypeHeaders = {\n PNG: [[0x89, 0x50, 0x4e, 0x47]],\n TIFF: [\n [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n [0x49, 0x49, 0x2a, 0x00] //Intel\n ],\n JPEG: [\n [\n 0xff,\n 0xd8,\n 0xff,\n 0xe0,\n undefined,\n undefined,\n 0x4a,\n 0x46,\n 0x49,\n 0x46,\n 0x00\n ], //JFIF\n [\n 0xff,\n 0xd8,\n 0xff,\n 0xe1,\n undefined,\n undefined,\n 0x45,\n 0x78,\n 0x69,\n 0x66,\n 0x00,\n 0x00\n ], //Exif\n [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n ],\n JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n WEBP: [\n [\n 0x52,\n 0x49,\n 0x46,\n 0x46,\n undefined,\n undefined,\n undefined,\n undefined,\n 0x57,\n 0x45,\n 0x42,\n 0x50\n ]\n ],\n BMP: [\n [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n [0x42, 0x41], //BA - OS/2 struct bitmap array\n [0x43, 0x49], //CI - OS/2 struct color icon\n [0x43, 0x50], //CP - OS/2 const color pointer\n [0x49, 0x43], //IC - OS/2 struct icon\n [0x50, 0x54] //PT - OS/2 pointer\n ]\n };\n\n /**\n * Recognize filetype of Image by magic-bytes\n *\n * https://en.wikipedia.org/wiki/List_of_file_signatures\n *\n * @name getImageFileTypeByImageData\n * @public\n * @function\n * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n *\n * @returns {string} filetype of Image\n */\n var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n imageData,\n fallbackFormat\n ) {\n fallbackFormat = fallbackFormat || UNKNOWN;\n var i;\n var j;\n var result = UNKNOWN;\n var headerSchemata;\n var compareResult;\n var fileType;\n\n if (\n fallbackFormat === \"RGBA\" ||\n (imageData.data !== undefined &&\n imageData.data instanceof Uint8ClampedArray &&\n \"height\" in imageData &&\n \"width\" in imageData)\n ) {\n return \"RGBA\";\n }\n\n if (isArrayBufferView(imageData)) {\n for (fileType in imageFileTypeHeaders) {\n headerSchemata = imageFileTypeHeaders[fileType];\n for (i = 0; i < headerSchemata.length; i += 1) {\n compareResult = true;\n for (j = 0; j < headerSchemata[i].length; j += 1) {\n if (headerSchemata[i][j] === undefined) {\n continue;\n }\n if (headerSchemata[i][j] !== imageData[j]) {\n compareResult = false;\n break;\n }\n }\n if (compareResult === true) {\n result = fileType;\n break;\n }\n }\n }\n } else {\n for (fileType in imageFileTypeHeaders) {\n headerSchemata = imageFileTypeHeaders[fileType];\n for (i = 0; i < headerSchemata.length; i += 1) {\n compareResult = true;\n for (j = 0; j < headerSchemata[i].length; j += 1) {\n if (headerSchemata[i][j] === undefined) {\n continue;\n }\n if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n compareResult = false;\n break;\n }\n }\n if (compareResult === true) {\n result = fileType;\n break;\n }\n }\n }\n }\n\n if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n result = fallbackFormat;\n }\n return result;\n });\n\n // Image functionality ported from pdf.js\n var putImage = function(image) {\n var out = this.internal.write;\n var putStream = this.internal.putStream;\n var getFilters = this.internal.getFilters;\n\n var filter = getFilters();\n while (filter.indexOf(\"FlateEncode\") !== -1) {\n filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n }\n\n image.objectId = this.internal.newObject();\n\n var additionalKeyValues = [];\n additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n additionalKeyValues.push({ key: \"Width\", value: image.width });\n additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n if (image.colorSpace === color_spaces.INDEXED) {\n additionalKeyValues.push({\n key: \"ColorSpace\",\n value:\n \"[/Indexed /DeviceRGB \" +\n // if an indexed png defines more than one colour with transparency, we've created a sMask\n (image.palette.length / 3 - 1) +\n \" \" +\n (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n ? image.objectId + 2\n : image.objectId + 1) +\n \" 0 R]\"\n });\n } else {\n additionalKeyValues.push({\n key: \"ColorSpace\",\n value: \"/\" + image.colorSpace\n });\n if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n }\n }\n additionalKeyValues.push({\n key: \"BitsPerComponent\",\n value: image.bitsPerComponent\n });\n if (\n \"decodeParameters\" in image &&\n typeof image.decodeParameters !== \"undefined\"\n ) {\n additionalKeyValues.push({\n key: \"DecodeParms\",\n value: \"<<\" + image.decodeParameters + \">>\"\n });\n }\n if (\"transparency\" in image && Array.isArray(image.transparency)) {\n var transparency = \"\",\n i = 0,\n len = image.transparency.length;\n for (; i < len; i++)\n transparency +=\n image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n additionalKeyValues.push({\n key: \"Mask\",\n value: \"[\" + transparency + \"]\"\n });\n }\n if (typeof image.sMask !== \"undefined\") {\n additionalKeyValues.push({\n key: \"SMask\",\n value: image.objectId + 1 + \" 0 R\"\n });\n }\n\n var alreadyAppliedFilters =\n typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n putStream({\n data: image.data,\n additionalKeyValues: additionalKeyValues,\n alreadyAppliedFilters: alreadyAppliedFilters,\n objectId: image.objectId\n });\n\n out(\"endobj\");\n\n // Soft mask\n if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n var decodeParameters =\n \"/Predictor \" +\n image.predictor +\n \" /Colors 1 /BitsPerComponent \" +\n image.bitsPerComponent +\n \" /Columns \" +\n image.width;\n var sMask = {\n width: image.width,\n height: image.height,\n colorSpace: \"DeviceGray\",\n bitsPerComponent: image.bitsPerComponent,\n decodeParameters: decodeParameters,\n data: image.sMask\n };\n if (\"filter\" in image) {\n sMask.filter = image.filter;\n }\n putImage.call(this, sMask);\n }\n\n //Palette\n if (image.colorSpace === color_spaces.INDEXED) {\n var objId = this.internal.newObject();\n //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n //putStream(zlib.compress(img['pal']));\n putStream({\n data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n objectId: objId\n });\n out(\"endobj\");\n }\n };\n var putResourcesCallback = function() {\n var images = this.internal.collections[namespace + \"images\"];\n for (var i in images) {\n putImage.call(this, images[i]);\n }\n };\n var putXObjectsDictCallback = function() {\n var images = this.internal.collections[namespace + \"images\"],\n out = this.internal.write,\n image;\n for (var i in images) {\n image = images[i];\n out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n }\n };\n\n var checkCompressValue = function(value) {\n if (value && typeof value === \"string\") value = value.toUpperCase();\n return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n };\n\n var initialize = function() {\n if (!this.internal.collections[namespace + \"images\"]) {\n this.internal.collections[namespace + \"images\"] = {};\n this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n }\n };\n\n var getImages = function() {\n var images = this.internal.collections[namespace + \"images\"];\n initialize.call(this);\n return images;\n };\n var getImageIndex = function() {\n return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n };\n var notDefined = function(value) {\n return typeof value === \"undefined\" || value === null || value.length === 0;\n };\n var generateAliasFromImageData = function(imageData) {\n if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n return sHashCode(imageData);\n } else if (isArrayBufferView(imageData.data)) {\n return sHashCode(imageData.data);\n }\n\n return null;\n };\n\n var isImageTypeSupported = function(type) {\n return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n };\n\n var isDOMElement = function(object) {\n return typeof object === \"object\" && object.nodeType === 1;\n };\n\n var getImageDataFromElement = function(element, format) {\n //if element is an image which uses data url definition, just return the dataurl\n if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n var src = \"\" + element.getAttribute(\"src\");\n\n //is base64 encoded dataUrl, directly process it\n if (src.indexOf(\"data:image/\") === 0) {\n return atob(\n unescape(src)\n .split(\"base64,\")\n .pop()\n );\n }\n\n //it is probably an url, try to load it\n var tmpImageData = jsPDFAPI.loadFile(src, true);\n if (tmpImageData !== undefined) {\n return tmpImageData;\n }\n }\n\n if (element.nodeName === \"CANVAS\") {\n if (element.width === 0 || element.height === 0) {\n throw new Error(\n \"Given canvas must have data. Canvas width: \" +\n element.width +\n \", height: \" +\n element.height\n );\n }\n var mimeType;\n switch (format) {\n case \"PNG\":\n mimeType = \"image/png\";\n break;\n case \"WEBP\":\n mimeType = \"image/webp\";\n break;\n case \"JPEG\":\n case \"JPG\":\n default:\n mimeType = \"image/jpeg\";\n break;\n }\n return atob(\n element\n .toDataURL(mimeType, 1.0)\n .split(\"base64,\")\n .pop()\n );\n }\n };\n\n var checkImagesForAlias = function(alias) {\n var images = this.internal.collections[namespace + \"images\"];\n if (images) {\n for (var e in images) {\n if (alias === images[e].alias) {\n return images[e];\n }\n }\n }\n };\n\n var determineWidthAndHeight = function(width, height, image) {\n if (!width && !height) {\n width = -96;\n height = -96;\n }\n if (width < 0) {\n width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n }\n if (height < 0) {\n height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n }\n if (width === 0) {\n width = (height * image.width) / image.height;\n }\n if (height === 0) {\n height = (width * image.height) / image.width;\n }\n\n return [width, height];\n };\n\n var writeImageToPDF = function(x, y, width, height, image, rotation) {\n var dims = determineWidthAndHeight.call(this, width, height, image),\n coord = this.internal.getCoordinateString,\n vcoord = this.internal.getVerticalCoordinateString;\n\n var images = getImages.call(this);\n\n width = dims[0];\n height = dims[1];\n images[image.index] = image;\n\n if (rotation) {\n rotation *= Math.PI / 180;\n var c = Math.cos(rotation);\n var s = Math.sin(rotation);\n //like in pdf Reference do it 4 digits instead of 2\n var f4 = function(number) {\n return number.toFixed(4);\n };\n var rotationTransformationMatrix = [\n f4(c),\n f4(s),\n f4(s * -1),\n f4(c),\n 0,\n 0,\n \"cm\"\n ];\n }\n this.internal.write(\"q\"); //Save graphics state\n if (rotation) {\n this.internal.write(\n [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n ); //Translate\n this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n this.internal.write(\n [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n ); //Scale\n } else {\n this.internal.write(\n [\n coord(width),\n \"0\",\n \"0\",\n coord(height),\n coord(x),\n vcoord(y + height),\n \"cm\"\n ].join(\" \")\n ); //Translate and Scale\n }\n\n if (this.isAdvancedAPI()) {\n // draw image bottom up when in \"advanced\" API mode\n this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n }\n\n this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n this.internal.write(\"Q\"); //Restore graphics state\n };\n\n /**\n * COLOR SPACES\n */\n var color_spaces = (jsPDFAPI.color_spaces = {\n DEVICE_RGB: \"DeviceRGB\",\n DEVICE_GRAY: \"DeviceGray\",\n DEVICE_CMYK: \"DeviceCMYK\",\n CAL_GREY: \"CalGray\",\n CAL_RGB: \"CalRGB\",\n LAB: \"Lab\",\n ICC_BASED: \"ICCBased\",\n INDEXED: \"Indexed\",\n PATTERN: \"Pattern\",\n SEPARATION: \"Separation\",\n DEVICE_N: \"DeviceN\"\n });\n\n /**\n * DECODE METHODS\n */\n jsPDFAPI.decode = {\n DCT_DECODE: \"DCTDecode\",\n FLATE_DECODE: \"FlateDecode\",\n LZW_DECODE: \"LZWDecode\",\n JPX_DECODE: \"JPXDecode\",\n JBIG2_DECODE: \"JBIG2Decode\",\n ASCII85_DECODE: \"ASCII85Decode\",\n ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n RUN_LENGTH_DECODE: \"RunLengthDecode\",\n CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n };\n\n /**\n * IMAGE COMPRESSION TYPES\n */\n var image_compression = (jsPDFAPI.image_compression = {\n NONE: \"NONE\",\n FAST: \"FAST\",\n MEDIUM: \"MEDIUM\",\n SLOW: \"SLOW\"\n });\n\n /**\n * @name sHashCode\n * @function\n * @param {string} data\n * @returns {string}\n */\n var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n var hash = 0,\n i,\n len;\n\n if (typeof data === \"string\") {\n len = data.length;\n for (i = 0; i < len; i++) {\n hash = (hash << 5) - hash + data.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n } else if (isArrayBufferView(data)) {\n len = data.byteLength / 2;\n for (i = 0; i < len; i++) {\n hash = (hash << 5) - hash + data[i];\n hash |= 0; // Convert to 32bit integer\n }\n }\n return hash;\n });\n\n /**\n * Validates if given String is a valid Base64-String\n *\n * @name validateStringAsBase64\n * @public\n * @function\n * @param {String} possible Base64-String\n *\n * @returns {boolean}\n */\n var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n possibleBase64String\n ) {\n possibleBase64String = possibleBase64String || \"\";\n possibleBase64String.toString().trim();\n\n var result = true;\n\n if (possibleBase64String.length === 0) {\n result = false;\n }\n\n if (possibleBase64String.length % 4 !== 0) {\n result = false;\n }\n\n if (\n /^[A-Za-z0-9+/]+$/.test(\n possibleBase64String.substr(0, possibleBase64String.length - 2)\n ) === false\n ) {\n result = false;\n }\n\n if (\n /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n possibleBase64String.substr(-2)\n ) === false\n ) {\n result = false;\n }\n return result;\n });\n\n /**\n * Strips out and returns info from a valid base64 data URI\n *\n * @name extractImageFromDataUrl\n * @function\n * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'\n * @returns {Array}an Array containing the following\n * [0] the complete data URI\n * [1] \n * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n * [4] \n */\n var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n dataUrl\n ) {\n dataUrl = dataUrl || \"\";\n var dataUrlParts = dataUrl.split(\"base64,\");\n var result = null;\n\n if (dataUrlParts.length === 2) {\n var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n dataUrlParts[0]\n );\n if (Array.isArray(extractedInfo)) {\n result = {\n mimeType: extractedInfo[1],\n charset: extractedInfo[2],\n data: dataUrlParts[1]\n };\n }\n }\n return result;\n });\n\n /**\n * Check to see if ArrayBuffer is supported\n *\n * @name supportsArrayBuffer\n * @function\n * @returns {boolean}\n */\n var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n return (\n typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n );\n });\n\n /**\n * Tests supplied object to determine if ArrayBuffer\n *\n * @name isArrayBuffer\n * @function\n * @param {Object} object an Object\n *\n * @returns {boolean}\n */\n jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n return supportsArrayBuffer() && object instanceof ArrayBuffer;\n };\n\n /**\n * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n *\n * @name isArrayBufferView\n * @function\n * @param {Object} object an Object\n * @returns {boolean}\n */\n var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n object\n ) {\n return (\n supportsArrayBuffer() &&\n typeof Uint32Array !== \"undefined\" &&\n (object instanceof Int8Array ||\n object instanceof Uint8Array ||\n (typeof Uint8ClampedArray !== \"undefined\" &&\n object instanceof Uint8ClampedArray) ||\n object instanceof Int16Array ||\n object instanceof Uint16Array ||\n object instanceof Int32Array ||\n object instanceof Uint32Array ||\n object instanceof Float32Array ||\n object instanceof Float64Array)\n );\n });\n\n /**\n * Convert Binary String to ArrayBuffer\n *\n * @name binaryStringToUint8Array\n * @public\n * @function\n * @param {string} BinaryString with ImageData\n * @returns {Uint8Array}\n */\n var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n binary_string\n ) {\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n });\n\n /**\n * Convert the Buffer to a Binary String\n *\n * @name arrayBufferToBinaryString\n * @public\n * @function\n * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n *\n * @returns {String}\n */\n var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n buffer\n ) {\n var out = \"\";\n // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n // Do not copy the array if input is already an array.\n var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n // Limit the amount of characters being parsed to prevent overflow.\n // Note that while TextDecoder would be faster, it does not have the same\n // functionality as fromCharCode with any provided encodings as of 3/2021.\n out += String.fromCharCode.apply(\n null,\n buf.subarray(i, i + ARRAY_APPLY_BATCH)\n );\n }\n return out;\n });\n\n /**\n * Possible parameter for addImage, an RGBA buffer with size.\n *\n * @typedef {Object} RGBAData\n * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n * @property {number} width - Image width as the data does not carry this information in itself.\n * @property {number} height - Image height as the data does not carry this information in itself.\n */\n\n /**\n * Adds an Image to the PDF.\n *\n * @name addImage\n * @public\n * @function\n * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n * @param {number} width width of the image (in units declared at inception of PDF document)\n * @param {number} height height of the Image (in units declared at inception of PDF document)\n * @param {string} alias alias of the image (if used multiple times)\n * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n * @param {number} rotation rotation of the image in degrees (0-359)\n *\n * @returns jsPDF\n */\n jsPDFAPI.addImage = function() {\n var imageData, format, x, y, w, h, alias, compression, rotation;\n\n imageData = arguments[0];\n if (typeof arguments[1] === \"number\") {\n format = UNKNOWN;\n x = arguments[1];\n y = arguments[2];\n w = arguments[3];\n h = arguments[4];\n alias = arguments[5];\n compression = arguments[6];\n rotation = arguments[7];\n } else {\n format = arguments[1];\n x = arguments[2];\n y = arguments[3];\n w = arguments[4];\n h = arguments[5];\n alias = arguments[6];\n compression = arguments[7];\n rotation = arguments[8];\n }\n\n if (\n typeof imageData === \"object\" &&\n !isDOMElement(imageData) &&\n \"imageData\" in imageData\n ) {\n var options = imageData;\n\n imageData = options.imageData;\n format = options.format || format || UNKNOWN;\n x = options.x || x || 0;\n y = options.y || y || 0;\n w = options.w || options.width || w;\n h = options.h || options.height || h;\n alias = options.alias || alias;\n compression = options.compression || compression;\n rotation = options.rotation || options.angle || rotation;\n }\n\n //If compression is not explicitly set, determine if we should use compression\n var filter = this.internal.getFilters();\n if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n compression = \"SLOW\";\n }\n\n if (isNaN(x) || isNaN(y)) {\n throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n }\n\n initialize.call(this);\n\n var image = processImageData.call(\n this,\n imageData,\n format,\n alias,\n compression\n );\n\n writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n return this;\n };\n\n var processImageData = function(imageData, format, alias, compression) {\n var result, dataAsBinaryString;\n\n if (\n typeof imageData === \"string\" &&\n getImageFileTypeByImageData(imageData) === UNKNOWN\n ) {\n imageData = unescape(imageData);\n var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n if (tmpImageData !== \"\") {\n imageData = tmpImageData;\n } else {\n tmpImageData = jsPDFAPI.loadFile(imageData, true);\n if (tmpImageData !== undefined) {\n imageData = tmpImageData;\n }\n }\n }\n\n if (isDOMElement(imageData)) {\n imageData = getImageDataFromElement(imageData, format);\n }\n\n format = getImageFileTypeByImageData(imageData, format);\n if (!isImageTypeSupported(format)) {\n throw new Error(\n \"addImage does not support files of type '\" +\n format +\n \"', please ensure that a plugin for '\" +\n format +\n \"' support is added.\"\n );\n }\n\n // now do the heavy lifting\n\n if (notDefined(alias)) {\n alias = generateAliasFromImageData(imageData);\n }\n result = checkImagesForAlias.call(this, alias);\n\n if (!result) {\n if (supportsArrayBuffer()) {\n // no need to convert if imageData is already uint8array\n if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n dataAsBinaryString = imageData;\n imageData = binaryStringToUint8Array(imageData);\n }\n }\n\n result = this[\"process\" + format.toUpperCase()](\n imageData,\n getImageIndex.call(this),\n alias,\n checkCompressValue(compression),\n dataAsBinaryString\n );\n }\n\n if (!result) {\n throw new Error(\"An unknown error occurred whilst processing the image.\");\n }\n return result;\n };\n\n /**\n * @name convertBase64ToBinaryString\n * @function\n * @param {string} stringData\n * @returns {string} binary string\n */\n var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n stringData,\n throwError\n ) {\n throwError = typeof throwError === \"boolean\" ? throwError : true;\n var base64Info;\n var imageData = \"\";\n var rawData;\n\n if (typeof stringData === \"string\") {\n base64Info = extractImageFromDataUrl(stringData);\n rawData = base64Info !== null ? base64Info.data : stringData;\n\n try {\n imageData = atob(rawData);\n } catch (e) {\n if (throwError) {\n if (!validateStringAsBase64(rawData)) {\n throw new Error(\n \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n );\n } else {\n throw new Error(\n \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n );\n }\n }\n }\n }\n return imageData;\n });\n\n /**\n * @name getImageProperties\n * @function\n * @param {Object} imageData\n * @returns {Object}\n */\n jsPDFAPI.getImageProperties = function(imageData) {\n var image;\n var tmpImageData = \"\";\n var format;\n\n if (isDOMElement(imageData)) {\n imageData = getImageDataFromElement(imageData);\n }\n\n if (\n typeof imageData === \"string\" &&\n getImageFileTypeByImageData(imageData) === UNKNOWN\n ) {\n tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n if (tmpImageData === \"\") {\n tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n }\n imageData = tmpImageData;\n }\n\n format = getImageFileTypeByImageData(imageData);\n if (!isImageTypeSupported(format)) {\n throw new Error(\n \"addImage does not support files of type '\" +\n format +\n \"', please ensure that a plugin for '\" +\n format +\n \"' support is added.\"\n );\n }\n\n if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n imageData = binaryStringToUint8Array(imageData);\n }\n\n image = this[\"process\" + format.toUpperCase()](imageData);\n\n if (!image) {\n throw new Error(\"An unknown error occurred whilst processing the image\");\n }\n\n image.fileType = format;\n\n return image;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n *
\n * This plugin current supports
\n *
  • Goto Page (set pageNumber and top in options)\n *
  • Goto Name (set name and top in options)\n *
  • Goto URL (set url in options)\n *

    \n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n * (set magFactor in options). XYZ is the default.\n *

    \n *

    \n * Links, Text, Popup, and FreeText are supported.\n *

    \n *

    \n * Options In PDF spec Not Implemented Yet\n *

  • link border\n *
  • named target\n *
  • page coordinates\n *
  • destination page scaling and layout\n *
  • actions other than URL and GotoPage\n *
  • background / hover actions\n *

    \n * @name annotations\n * @module\n */\n\n/*\n Destination Magnification Factors\n See PDF 1.3 Page 386 for meanings and options\n\n [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var notEmpty = function(obj) {\n if (typeof obj != \"undefined\") {\n if (obj != \"\") {\n return true;\n }\n }\n };\n\n jsPDF.API.events.push([\n \"addPage\",\n function(addPageData) {\n var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n pageInfo.pageContext.annotations = [];\n }\n ]);\n\n jsPDFAPI.events.push([\n \"putPage\",\n function(putPageData) {\n var getHorizontalCoordinateString = this.internal.getCoordinateString;\n var getVerticalCoordinateString = this.internal\n .getVerticalCoordinateString;\n var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n var pageAnnos = putPageData.pageContext.annotations;\n\n var anno, rect, line;\n var found = false;\n for (var a = 0; a < pageAnnos.length && !found; a++) {\n anno = pageAnnos[a];\n switch (anno.type) {\n case \"link\":\n if (\n notEmpty(anno.options.url) ||\n notEmpty(anno.options.pageNumber)\n ) {\n found = true;\n }\n break;\n case \"reference\":\n case \"text\":\n case \"freetext\":\n found = true;\n break;\n }\n }\n if (found == false) {\n return;\n }\n\n this.internal.write(\"/Annots [\");\n for (var i = 0; i < pageAnnos.length; i++) {\n anno = pageAnnos[i];\n var escape = this.internal.pdfEscape;\n var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n switch (anno.type) {\n case \"reference\":\n // References to Widget Annotations (for AcroForm Fields)\n this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n break;\n case \"text\":\n // Create a an object for both the text and the popup\n var objText = this.internal.newAdditionalObject();\n var objPopup = this.internal.newAdditionalObject();\n var encryptorText = this.internal.getEncryptor(objText.objId);\n\n var title = anno.title || \"Note\";\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \" \" +\n getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \"] \";\n\n line =\n \"<>\";\n objText.content = line;\n\n var parent = objText.objId + \" 0 R\";\n var popoff = 30;\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x + popoff) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \" \" +\n getHorizontalCoordinateString(\n anno.bounds.x + anno.bounds.w + popoff\n ) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \"] \";\n line =\n \"<>\";\n objPopup.content = line;\n\n this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n break;\n case \"freetext\":\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \" \" +\n getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \"] \";\n var color = anno.color || \"#000000\";\n line =\n \"<>\";\n this.internal.write(line);\n break;\n case \"link\":\n if (anno.options.name) {\n var loc = this.annotations._nameMap[anno.options.name];\n anno.options.pageNumber = loc.page;\n anno.options.top = loc.y;\n } else {\n if (!anno.options.top) {\n anno.options.top = 0;\n }\n }\n\n rect =\n \"/Rect [\" +\n anno.finalBounds.x +\n \" \" +\n anno.finalBounds.y +\n \" \" +\n anno.finalBounds.w +\n \" \" +\n anno.finalBounds.h +\n \"] \";\n\n line = \"\";\n if (anno.options.url) {\n line =\n \"<>\";\n } else if (anno.options.pageNumber) {\n // first page is 0\n var info = this.internal.getPageInfo(anno.options.pageNumber);\n line =\n \"<>\";\n this.internal.write(line);\n }\n break;\n }\n }\n this.internal.write(\"]\");\n }\n ]);\n\n /**\n * @name createAnnotation\n * @function\n * @param {Object} options\n */\n jsPDFAPI.createAnnotation = function(options) {\n var pageInfo = this.internal.getCurrentPageInfo();\n switch (options.type) {\n case \"link\":\n this.link(\n options.bounds.x,\n options.bounds.y,\n options.bounds.w,\n options.bounds.h,\n options\n );\n break;\n case \"text\":\n case \"freetext\":\n pageInfo.pageContext.annotations.push(options);\n break;\n }\n };\n\n /**\n * Create a link\n *\n * valid options\n *
  • pageNumber or url [required]\n *

    If pageNumber is specified, top and zoom may also be specified

    \n * @name link\n * @function\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {Object} options\n */\n jsPDFAPI.link = function(x, y, w, h, options) {\n var pageInfo = this.internal.getCurrentPageInfo();\n var getHorizontalCoordinateString = this.internal.getCoordinateString;\n var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n pageInfo.pageContext.annotations.push({\n finalBounds: {\n x: getHorizontalCoordinateString(x),\n y: getVerticalCoordinateString(y),\n w: getHorizontalCoordinateString(x + w),\n h: getVerticalCoordinateString(y + h)\n },\n options: options,\n type: \"link\"\n });\n };\n\n /**\n * Currently only supports single line text.\n * Returns the width of the text/link\n *\n * @name textWithLink\n * @function\n * @param {string} text\n * @param {number} x\n * @param {number} y\n * @param {Object} options\n * @returns {number} width the width of the text/link\n */\n jsPDFAPI.textWithLink = function(text, x, y, options) {\n var totalLineWidth = this.getTextWidth(text);\n var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n var linkHeight, linkWidth;\n\n // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n if (options.maxWidth !== undefined) {\n var { maxWidth } = options;\n linkWidth = maxWidth;\n var numOfLines = this.splitTextToSize(text, linkWidth).length;\n linkHeight = Math.ceil(lineHeight * numOfLines);\n } else {\n linkWidth = totalLineWidth;\n linkHeight = lineHeight;\n }\n\n this.text(text, x, y, options);\n\n //TODO We really need the text baseline height to do this correctly.\n // Or ability to draw text on top, bottom, center, or baseline.\n y += lineHeight * 0.2;\n //handle x position based on the align option\n if (options.align === \"center\") {\n x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n }\n if (options.align === \"right\") {\n x = x - totalLineWidth;\n }\n this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n return totalLineWidth;\n };\n\n //TODO move into external library\n /**\n * @name getTextWidth\n * @function\n * @param {string} text\n * @returns {number} txtWidth\n */\n jsPDFAPI.getTextWidth = function(text) {\n var fontSize = this.internal.getFontSize();\n var txtWidth =\n (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n return txtWidth;\n };\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n * Arabic Substition A\n */\n var arabicSubstitionA = {\n 0x0621: [0xfe80], // ARABIC LETTER HAMZA\n 0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n 0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n 0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n 0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n 0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n 0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n 0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n 0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n 0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n 0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n 0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n 0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n 0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n 0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n 0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n 0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n 0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n 0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n 0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n 0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n 0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n 0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n 0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n 0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n 0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n 0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n 0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n 0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n 0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n 0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n 0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n 0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n 0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n 0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n 0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n 0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n 0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n 0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n 0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n 0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n 0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n 0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n 0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n 0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n 0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n 0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n 0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n 0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n 0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n 0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n 0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n 0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n 0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n 0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n 0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n 0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n 0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n 0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n 0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n 0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n 0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n 0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n 0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n 0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n 0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n 0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n 0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n 0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n 0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n 0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n 0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n 0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n 0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n 0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n 0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n };\n\n /*\n var ligaturesSubstitutionA = {\n 0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n };\n */\n\n var ligatures = {\n 0xfedf: {\n 0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n 0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n 0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n 0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n },\n 0xfee0: {\n 0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n 0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n 0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n 0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n },\n 0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n 0x0651: {\n 0x064c: 0xfc5e, // Shadda + Dammatan\n 0x064d: 0xfc5f, // Shadda + Kasratan\n 0x064e: 0xfc60, // Shadda + Fatha\n 0x064f: 0xfc61, // Shadda + Damma\n 0x0650: 0xfc62 // Shadda + Kasra\n }\n };\n\n var arabic_diacritics = {\n 1612: 64606, // Shadda + Dammatan\n 1613: 64607, // Shadda + Kasratan\n 1614: 64608, // Shadda + Fatha\n 1615: 64609, // Shadda + Damma\n 1616: 64610 // Shadda + Kasra\n };\n\n var alfletter = [1570, 1571, 1573, 1575];\n\n var noChangeInForm = -1;\n var isolatedForm = 0;\n var finalForm = 1;\n var initialForm = 2;\n var medialForm = 3;\n\n jsPDFAPI.__arabicParser__ = {};\n\n //private\n var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n letter\n ) {\n return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n });\n\n var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n letter\n ) {\n return (\n typeof letter === \"string\" &&\n /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n letter\n )\n );\n });\n\n var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n );\n });\n\n var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n letter\n ) {\n return (\n isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n );\n });\n\n jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n );\n };\n\n var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n );\n });\n\n jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n );\n };\n\n var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length == 4\n );\n });\n\n var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n letters\n ) {\n var i = 0;\n var tmpLigatures = ligatures;\n var result = \"\";\n var effectedLetters = 0;\n\n for (i = 0; i < letters.length; i += 1) {\n if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n effectedLetters++;\n tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n if (typeof tmpLigatures === \"number\") {\n result += String.fromCharCode(tmpLigatures);\n tmpLigatures = ligatures;\n effectedLetters = 0;\n }\n if (i === letters.length - 1) {\n tmpLigatures = ligatures;\n result += letters.charAt(i - (effectedLetters - 1));\n i = i - (effectedLetters - 1);\n effectedLetters = 0;\n }\n } else {\n tmpLigatures = ligatures;\n result += letters.charAt(i - effectedLetters);\n i = i - effectedLetters;\n effectedLetters = 0;\n }\n }\n\n return result;\n });\n\n jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n return (\n letter !== undefined &&\n arabic_diacritics[letter.charCodeAt(0)] !== undefined\n );\n };\n\n var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n currentChar,\n beforeChar,\n nextChar\n ) {\n if (!isArabicLetter(currentChar)) {\n return -1;\n }\n\n if (isInArabicSubstitutionA(currentChar) === false) {\n return noChangeInForm;\n }\n if (\n !arabicLetterHasFinalForm(currentChar) ||\n (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n ) {\n return isolatedForm;\n }\n\n if (\n arabicLetterHasMedialForm(currentChar) &&\n isArabicLetter(beforeChar) &&\n !isArabicEndLetter(beforeChar) &&\n isArabicLetter(nextChar) &&\n arabicLetterHasFinalForm(nextChar)\n ) {\n return medialForm;\n }\n\n if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n return finalForm;\n }\n return initialForm;\n });\n\n /**\n * @name processArabic\n * @function\n * @param {string} text\n * @returns {string}\n */\n var parseArabic = function(text) {\n text = text || \"\";\n\n var result = \"\";\n var i = 0;\n var j = 0;\n var position = 0;\n var currentLetter = \"\";\n var prevLetter = \"\";\n var nextLetter = \"\";\n\n var words = text.split(\"\\\\s+\");\n var newWords = [];\n for (i = 0; i < words.length; i += 1) {\n newWords.push(\"\");\n for (j = 0; j < words[i].length; j += 1) {\n currentLetter = words[i][j];\n prevLetter = words[i][j - 1];\n nextLetter = words[i][j + 1];\n if (isArabicLetter(currentLetter)) {\n position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n if (position !== -1) {\n newWords[i] += String.fromCharCode(\n arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n );\n } else {\n newWords[i] += currentLetter;\n }\n } else {\n newWords[i] += currentLetter;\n }\n }\n\n newWords[i] = resolveLigatures(newWords[i]);\n }\n result = newWords.join(\" \");\n\n return result;\n };\n\n var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n var text =\n typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n var tmpText = [];\n var result;\n\n if (Array.isArray(text)) {\n var i = 0;\n tmpText = [];\n for (i = 0; i < text.length; i += 1) {\n if (Array.isArray(text[i])) {\n tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n } else {\n tmpText.push([parseArabic(text[i])]);\n }\n }\n result = tmpText;\n } else {\n result = parseArabic(text);\n }\n if (typeof arguments[0] === \"string\") {\n return result;\n } else {\n arguments[0].text = result;\n return arguments[0];\n }\n });\n\n jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n *\n * @name autoPrint\n * @function\n * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n * @returns {jsPDF}\n * @example\n * var doc = new jsPDF();\n * doc.text(10, 10, 'This is a test');\n * doc.autoPrint({variant: 'non-conform'});\n * doc.save('autoprint.pdf');\n */\n jsPDFAPI.autoPrint = function(options) {\n \"use strict\";\n var refAutoPrintTag;\n options = options || {};\n options.variant = options.variant || \"non-conform\";\n\n switch (options.variant) {\n case \"javascript\":\n //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n this.addJS(\"print({});\");\n break;\n case \"non-conform\":\n default:\n this.internal.events.subscribe(\"postPutResources\", function() {\n refAutoPrintTag = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/S /Named\");\n this.internal.out(\"/Type /Action\");\n this.internal.out(\"/N /Print\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n });\n\n this.internal.events.subscribe(\"putCatalog\", function() {\n this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n });\n break;\n }\n return this;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @class Canvas\n * @classdesc A Canvas Wrapper for jsPDF\n */\n var Canvas = function() {\n var jsPdfInstance = undefined;\n Object.defineProperty(this, \"pdf\", {\n get: function() {\n return jsPdfInstance;\n },\n set: function(value) {\n jsPdfInstance = value;\n }\n });\n\n var _width = 150;\n /**\n * The height property is a positive integer reflecting the height HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n * This is one of the two properties, the other being width, that controls the size of the canvas.\n *\n * @name width\n */\n Object.defineProperty(this, \"width\", {\n get: function() {\n return _width;\n },\n set: function(value) {\n if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n _width = 150;\n } else {\n _width = value;\n }\n if (this.getContext(\"2d\").pageWrapXEnabled) {\n this.getContext(\"2d\").pageWrapX = _width + 1;\n }\n }\n });\n\n var _height = 300;\n /**\n * The width property is a positive integer reflecting the width HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n * This is one of the two properties, the other being height, that controls the size of the canvas.\n *\n * @name height\n */\n Object.defineProperty(this, \"height\", {\n get: function() {\n return _height;\n },\n set: function(value) {\n if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n _height = 300;\n } else {\n _height = value;\n }\n if (this.getContext(\"2d\").pageWrapYEnabled) {\n this.getContext(\"2d\").pageWrapY = _height + 1;\n }\n }\n });\n\n var _childNodes = [];\n Object.defineProperty(this, \"childNodes\", {\n get: function() {\n return _childNodes;\n },\n set: function(value) {\n _childNodes = value;\n }\n });\n\n var _style = {};\n Object.defineProperty(this, \"style\", {\n get: function() {\n return _style;\n },\n set: function(value) {\n _style = value;\n }\n });\n\n Object.defineProperty(this, \"parentNode\", {});\n };\n\n /**\n * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n *\n * @name getContext\n * @function\n * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n * @param {object} contextAttributes\n */\n Canvas.prototype.getContext = function(contextType, contextAttributes) {\n contextType = contextType || \"2d\";\n var key;\n\n if (contextType !== \"2d\") {\n return null;\n }\n for (key in contextAttributes) {\n if (this.pdf.context2d.hasOwnProperty(key)) {\n this.pdf.context2d[key] = contextAttributes[key];\n }\n }\n this.pdf.context2d._canvas = this;\n return this.pdf.context2d;\n };\n\n /**\n * The toDataURL() method is just a stub to throw an error if accidently called.\n *\n * @name toDataURL\n * @function\n */\n Canvas.prototype.toDataURL = function() {\n throw new Error(\"toDataURL is not implemented.\");\n };\n\n jsPDFAPI.events.push([\n \"initialized\",\n function() {\n this.canvas = new Canvas();\n this.canvas.pdf = this;\n }\n ]);\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n * 2013 Lee Driscoll, https://github.com/lsdriscoll\n * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n * 2014 James Hall, james@parall.ax\n * 2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n var px2pt = (0.264583 * 72) / 25.4;\n var printingHeaderRow = false;\n\n var _initialize = function() {\n if (typeof this.internal.__cell__ === \"undefined\") {\n this.internal.__cell__ = {};\n this.internal.__cell__.padding = 3;\n this.internal.__cell__.headerFunction = undefined;\n this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n this.internal.__cell__.margins.width = this.getPageWidth();\n _reset.call(this);\n }\n };\n\n var _reset = function() {\n this.internal.__cell__.lastCell = new Cell();\n this.internal.__cell__.pages = 1;\n };\n\n var Cell = function() {\n var _x = arguments[0];\n Object.defineProperty(this, \"x\", {\n enumerable: true,\n get: function() {\n return _x;\n },\n set: function(value) {\n _x = value;\n }\n });\n var _y = arguments[1];\n Object.defineProperty(this, \"y\", {\n enumerable: true,\n get: function() {\n return _y;\n },\n set: function(value) {\n _y = value;\n }\n });\n var _width = arguments[2];\n Object.defineProperty(this, \"width\", {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n _width = value;\n }\n });\n var _height = arguments[3];\n Object.defineProperty(this, \"height\", {\n enumerable: true,\n get: function() {\n return _height;\n },\n set: function(value) {\n _height = value;\n }\n });\n var _text = arguments[4];\n Object.defineProperty(this, \"text\", {\n enumerable: true,\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = value;\n }\n });\n var _lineNumber = arguments[5];\n Object.defineProperty(this, \"lineNumber\", {\n enumerable: true,\n get: function() {\n return _lineNumber;\n },\n set: function(value) {\n _lineNumber = value;\n }\n });\n var _align = arguments[6];\n Object.defineProperty(this, \"align\", {\n enumerable: true,\n get: function() {\n return _align;\n },\n set: function(value) {\n _align = value;\n }\n });\n\n return this;\n };\n\n Cell.prototype.clone = function() {\n return new Cell(\n this.x,\n this.y,\n this.width,\n this.height,\n this.text,\n this.lineNumber,\n this.align\n );\n };\n\n Cell.prototype.toArray = function() {\n return [\n this.x,\n this.y,\n this.width,\n this.height,\n this.text,\n this.lineNumber,\n this.align\n ];\n };\n\n /**\n * @name setHeaderFunction\n * @function\n * @param {function} func\n */\n jsPDFAPI.setHeaderFunction = function(func) {\n _initialize.call(this);\n this.internal.__cell__.headerFunction =\n typeof func === \"function\" ? func : undefined;\n return this;\n };\n\n /**\n * @name getTextDimensions\n * @function\n * @param {string} txt\n * @returns {Object} dimensions\n */\n jsPDFAPI.getTextDimensions = function(text, options) {\n _initialize.call(this);\n options = options || {};\n var fontSize = options.fontSize || this.getFontSize();\n var font = options.font || this.getFont();\n var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n var width = 0;\n var amountOfLines = 0;\n var height = 0;\n var tempWidth = 0;\n var scope = this;\n\n if (!Array.isArray(text) && typeof text !== \"string\") {\n if (typeof text === \"number\") {\n text = String(text);\n } else {\n throw new Error(\n \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n );\n }\n }\n\n const maxWidth = options.maxWidth;\n if (maxWidth > 0) {\n if (typeof text === \"string\") {\n text = this.splitTextToSize(text, maxWidth);\n } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n text = text.reduce(function(acc, textLine) {\n return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n }, []);\n }\n } else {\n // Without the else clause, it will not work if you do not pass along maxWidth\n text = Array.isArray(text) ? text : [text];\n }\n\n for (var i = 0; i < text.length; i++) {\n tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n if (width < tempWidth) {\n width = tempWidth;\n }\n }\n\n if (width !== 0) {\n amountOfLines = text.length;\n }\n\n width = width / scaleFactor;\n height = Math.max(\n (amountOfLines * fontSize * this.getLineHeightFactor() -\n fontSize * (this.getLineHeightFactor() - 1)) /\n scaleFactor,\n 0\n );\n return { w: width, h: height };\n };\n\n /**\n * @name cellAddPage\n * @function\n */\n jsPDFAPI.cellAddPage = function() {\n _initialize.call(this);\n\n this.addPage();\n\n var margins = this.internal.__cell__.margins || NO_MARGINS;\n this.internal.__cell__.lastCell = new Cell(\n margins.left,\n margins.top,\n undefined,\n undefined\n );\n this.internal.__cell__.pages += 1;\n\n return this;\n };\n\n /**\n * @name cell\n * @function\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} text\n * @param {number} lineNumber lineNumber\n * @param {string} align\n * @return {jsPDF} jsPDF-instance\n */\n var cell = (jsPDFAPI.cell = function() {\n var currentCell;\n\n if (arguments[0] instanceof Cell) {\n currentCell = arguments[0];\n } else {\n currentCell = new Cell(\n arguments[0],\n arguments[1],\n arguments[2],\n arguments[3],\n arguments[4],\n arguments[5]\n );\n }\n _initialize.call(this);\n var lastCell = this.internal.__cell__.lastCell;\n var padding = this.internal.__cell__.padding;\n var margins = this.internal.__cell__.margins || NO_MARGINS;\n var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n var printHeaders = this.internal.__cell__.printHeaders;\n // If this is not the first cell, we must change its position\n if (typeof lastCell.lineNumber !== \"undefined\") {\n if (lastCell.lineNumber === currentCell.lineNumber) {\n //Same line\n currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n currentCell.y = lastCell.y || 0;\n } else {\n //New line\n if (\n lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n this.getPageHeight()\n ) {\n this.cellAddPage();\n currentCell.y = margins.top;\n if (printHeaders && tableHeaderRow) {\n this.printHeaderRow(currentCell.lineNumber, true);\n currentCell.y += tableHeaderRow[0].height;\n }\n } else {\n currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n }\n }\n }\n\n if (typeof currentCell.text[0] !== \"undefined\") {\n this.rect(\n currentCell.x,\n currentCell.y,\n currentCell.width,\n currentCell.height,\n printingHeaderRow === true ? \"FD\" : undefined\n );\n if (currentCell.align === \"right\") {\n this.text(\n currentCell.text,\n currentCell.x + currentCell.width - padding,\n currentCell.y + padding,\n { align: \"right\", baseline: \"top\" }\n );\n } else if (currentCell.align === \"center\") {\n this.text(\n currentCell.text,\n currentCell.x + currentCell.width / 2,\n currentCell.y + padding,\n {\n align: \"center\",\n baseline: \"top\",\n maxWidth: currentCell.width - padding - padding\n }\n );\n } else {\n this.text(\n currentCell.text,\n currentCell.x + padding,\n currentCell.y + padding,\n {\n align: \"left\",\n baseline: \"top\",\n maxWidth: currentCell.width - padding - padding\n }\n );\n }\n }\n this.internal.__cell__.lastCell = currentCell;\n return this;\n });\n\n /**\n * Create a table from a set of data.\n * @name table\n * @function\n * @param {Integer} [x] : left-position for top-left corner of table\n * @param {Integer} [y] top-position for top-left corner of table\n * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n * @param {Object} [config.margins] margin values for left, top, bottom, and width\n * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n * @param {Object} [config.padding] cell-padding in pt to use (optional)\n * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n * @param {Object} [config.headerTextColor] default is #000 (optional)\n * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n * @returns {jsPDF} jsPDF-instance\n */\n\n jsPDFAPI.table = function(x, y, data, headers, config) {\n _initialize.call(this);\n if (!data) {\n throw new Error(\"No data for PDF table.\");\n }\n\n config = config || {};\n\n var headerNames = [],\n headerLabels = [],\n headerAligns = [],\n i,\n columnMatrix = {},\n columnWidths = {},\n column,\n columnMinWidths = [],\n j,\n tableHeaderConfigs = [],\n //set up defaults. If a value is provided in config, defaults will be overwritten:\n autoSize = config.autoSize || false,\n printHeaders = config.printHeaders === false ? false : true,\n fontSize =\n config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n ? config.css[\"font-size\"] * 16\n : config.fontSize || 12,\n margins =\n config.margins ||\n Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n padding = typeof config.padding === \"number\" ? config.padding : 3,\n headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n headerTextColor = config.headerTextColor || \"#000\";\n\n _reset.call(this);\n\n this.internal.__cell__.printHeaders = printHeaders;\n this.internal.__cell__.margins = margins;\n this.internal.__cell__.table_font_size = fontSize;\n this.internal.__cell__.padding = padding;\n this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n this.internal.__cell__.headerTextColor = headerTextColor;\n this.setFontSize(fontSize);\n\n // Set header values\n if (headers === undefined || headers === null) {\n // No headers defined so we derive from data\n headerNames = Object.keys(data[0]);\n headerLabels = headerNames;\n headerAligns = headerNames.map(function() {\n return \"left\";\n });\n } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n headerNames = headers.map(function(header) {\n return header.name;\n });\n headerLabels = headers.map(function(header) {\n return header.prompt || header.name || \"\";\n });\n headerAligns = headers.map(function(header) {\n return header.align || \"left\";\n });\n // Split header configs into names and prompts\n for (i = 0; i < headers.length; i += 1) {\n columnWidths[headers[i].name] = headers[i].width * px2pt;\n }\n } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n headerNames = headers;\n headerLabels = headerNames;\n headerAligns = headerNames.map(function() {\n return \"left\";\n });\n }\n\n if (\n autoSize ||\n (Array.isArray(headers) && typeof headers[0] === \"string\")\n ) {\n var headerName;\n for (i = 0; i < headerNames.length; i += 1) {\n headerName = headerNames[i];\n\n // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n columnMatrix[headerName] = data.map(function(rec) {\n return rec[headerName];\n });\n\n // get header width\n this.setFont(undefined, \"bold\");\n columnMinWidths.push(\n this.getTextDimensions(headerLabels[i], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w\n );\n column = columnMatrix[headerName];\n\n // get cell widths\n this.setFont(undefined, \"normal\");\n for (j = 0; j < column.length; j += 1) {\n columnMinWidths.push(\n this.getTextDimensions(column[j], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w\n );\n }\n\n // get final column width\n columnWidths[headerName] =\n Math.max.apply(null, columnMinWidths) + padding + padding;\n\n //have to reset\n columnMinWidths = [];\n }\n }\n\n // -- Construct the table\n\n if (printHeaders) {\n var row = {};\n for (i = 0; i < headerNames.length; i += 1) {\n row[headerNames[i]] = {};\n row[headerNames[i]].text = headerLabels[i];\n row[headerNames[i]].align = headerAligns[i];\n }\n\n var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n // Construct the header row\n tableHeaderConfigs = headerNames.map(function(value) {\n return new Cell(\n x,\n y,\n columnWidths[value],\n rowHeight,\n row[value].text,\n undefined,\n row[value].align\n );\n });\n\n // Store the table header config\n this.setTableHeaderRow(tableHeaderConfigs);\n\n // Print the header for the start of the table\n this.printHeaderRow(1, false);\n }\n\n // Construct the data rows\n\n var align = headers.reduce(function(pv, cv) {\n pv[cv.name] = cv.align;\n return pv;\n }, {});\n for (i = 0; i < data.length; i += 1) {\n if (\"rowStart\" in config && config.rowStart instanceof Function) {\n config.rowStart(\n {\n row: i,\n data: data[i]\n },\n this\n );\n }\n var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n for (j = 0; j < headerNames.length; j += 1) {\n var cellData = data[i][headerNames[j]];\n if (\"cellStart\" in config && config.cellStart instanceof Function) {\n config.cellStart(\n {\n row: i,\n col: j,\n data: cellData\n },\n this\n );\n }\n cell.call(\n this,\n new Cell(\n x,\n y,\n columnWidths[headerNames[j]],\n lineHeight,\n cellData,\n i + 2,\n align[headerNames[j]]\n )\n );\n }\n }\n this.internal.__cell__.table_x = x;\n this.internal.__cell__.table_y = y;\n return this;\n };\n\n /**\n * Calculate the height for containing the highest column\n *\n * @name calculateLineHeight\n * @function\n * @param {Object[]} model is the line of data we want to calculate the height of\n * @param {Integer[]} columnWidths is size of each column\n * @returns {number} lineHeight\n * @private\n */\n var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n var padding = this.internal.__cell__.padding;\n var fontSize = this.internal.__cell__.table_font_size;\n var scaleFactor = this.internal.scaleFactor;\n\n return Object.keys(model)\n .map(function(key) {\n var value = model[key];\n return this.splitTextToSize(\n value.hasOwnProperty(\"text\") ? value.text : value,\n columnWidths[key] - padding - padding\n );\n }, this)\n .map(function(value) {\n return (\n (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n padding +\n padding\n );\n }, this)\n .reduce(function(pv, cv) {\n return Math.max(pv, cv);\n }, 0);\n };\n\n /**\n * Store the config for outputting a table header\n *\n * @name setTableHeaderRow\n * @function\n * @param {Object[]} config\n * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n * except the lineNumber parameter is excluded\n */\n jsPDFAPI.setTableHeaderRow = function(config) {\n _initialize.call(this);\n this.internal.__cell__.tableHeaderRow = config;\n };\n\n /**\n * Output the store header row\n *\n * @name printHeaderRow\n * @function\n * @param {number} lineNumber The line number to output the header at\n * @param {boolean} new_page\n */\n jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n _initialize.call(this);\n if (!this.internal.__cell__.tableHeaderRow) {\n throw new Error(\"Property tableHeaderRow does not exist.\");\n }\n\n var tableHeaderCell;\n\n printingHeaderRow = true;\n if (typeof this.internal.__cell__.headerFunction === \"function\") {\n var position = this.internal.__cell__.headerFunction(\n this,\n this.internal.__cell__.pages\n );\n this.internal.__cell__.lastCell = new Cell(\n position[0],\n position[1],\n position[2],\n position[3],\n undefined,\n -1\n );\n }\n this.setFont(undefined, \"bold\");\n\n var tempHeaderConf = [];\n for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n if (new_page) {\n tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n tempHeaderConf.push(tableHeaderCell);\n }\n tableHeaderCell.lineNumber = lineNumber;\n var currentTextColor = this.getTextColor();\n this.setTextColor(this.internal.__cell__.headerTextColor);\n this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n cell.call(this, tableHeaderCell);\n this.setTextColor(currentTextColor);\n }\n if (tempHeaderConf.length > 0) {\n this.setTableHeaderRow(tempHeaderConf);\n }\n this.setFont(undefined, \"normal\");\n printingHeaderRow = false;\n };\n})(jsPDF.API);\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n buildFontFaceMap,\r\n parseFontFamily,\r\n resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n \"use strict\";\r\n var ContextLayer = function(ctx) {\r\n ctx = ctx || {};\r\n this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n this.strokeOpacity = ctx.strokeOpacity || 1;\r\n this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n this.fillStyle = ctx.fillStyle || \"#000000\";\r\n this.isFillTransparent = ctx.isFillTransparent || false;\r\n this.fillOpacity = ctx.fillOpacity || 1;\r\n this.font = ctx.font || \"10px sans-serif\";\r\n this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n this.textAlign = ctx.textAlign || \"left\";\r\n this.lineWidth = ctx.lineWidth || 1;\r\n this.lineJoin = ctx.lineJoin || \"miter\";\r\n this.lineCap = ctx.lineCap || \"butt\";\r\n this.path = ctx.path || [];\r\n this.transform =\r\n typeof ctx.transform !== \"undefined\"\r\n ? ctx.transform.clone()\r\n : new Matrix();\r\n this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n this.globalAlpha = ctx.globalAlpha || 1.0;\r\n this.clip_path = ctx.clip_path || [];\r\n this.currentPoint = ctx.currentPoint || new Point();\r\n this.miterLimit = ctx.miterLimit || 10.0;\r\n this.lastPoint = ctx.lastPoint || new Point();\r\n this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n this.lineDash = ctx.lineDash || [];\r\n this.margin = ctx.margin || [0, 0, 0, 0];\r\n this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n this.ignoreClearRect =\r\n typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n return this;\r\n };\r\n\r\n //stub\r\n var f2,\r\n getHorizontalCoordinateString,\r\n getVerticalCoordinateString,\r\n getHorizontalCoordinate,\r\n getVerticalCoordinate,\r\n Point,\r\n Rectangle,\r\n Matrix,\r\n _ctx;\r\n jsPDFAPI.events.push([\r\n \"initialized\",\r\n function() {\r\n this.context2d = new Context2D(this);\r\n\r\n f2 = this.internal.f2;\r\n getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n Point = this.internal.Point;\r\n Rectangle = this.internal.Rectangle;\r\n Matrix = this.internal.Matrix;\r\n _ctx = new ContextLayer();\r\n }\r\n ]);\r\n\r\n var Context2D = function(pdf) {\r\n Object.defineProperty(this, \"canvas\", {\r\n get: function() {\r\n return { parentNode: false, style: false };\r\n }\r\n });\r\n\r\n var _pdf = pdf;\r\n Object.defineProperty(this, \"pdf\", {\r\n get: function() {\r\n return _pdf;\r\n }\r\n });\r\n\r\n var _pageWrapXEnabled = false;\r\n /**\r\n * @name pageWrapXEnabled\r\n * @type {boolean}\r\n * @default false\r\n */\r\n Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n get: function() {\r\n return _pageWrapXEnabled;\r\n },\r\n set: function(value) {\r\n _pageWrapXEnabled = Boolean(value);\r\n }\r\n });\r\n\r\n var _pageWrapYEnabled = false;\r\n /**\r\n * @name pageWrapYEnabled\r\n * @type {boolean}\r\n * @default true\r\n */\r\n Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n get: function() {\r\n return _pageWrapYEnabled;\r\n },\r\n set: function(value) {\r\n _pageWrapYEnabled = Boolean(value);\r\n }\r\n });\r\n\r\n var _posX = 0;\r\n /**\r\n * @name posX\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"posX\", {\r\n get: function() {\r\n return _posX;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _posX = value;\r\n }\r\n }\r\n });\r\n\r\n var _posY = 0;\r\n /**\r\n * @name posY\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"posY\", {\r\n get: function() {\r\n return _posY;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _posY = value;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n * @name margin\r\n * @type {number|number[]}\r\n * @default [0, 0, 0, 0]\r\n */\r\n Object.defineProperty(this, \"margin\", {\r\n get: function() {\r\n return _ctx.margin;\r\n },\r\n set: function(value) {\r\n var margin;\r\n if (typeof value === \"number\") {\r\n margin = [value, value, value, value];\r\n } else {\r\n margin = new Array(4);\r\n margin[0] = value[0];\r\n margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n }\r\n _ctx.margin = margin;\r\n }\r\n });\r\n\r\n var _autoPaging = false;\r\n /**\r\n * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n * pages if required.\r\n *\r\n * Context2d supports different modes:\r\n *
      \r\n *
    • \r\n * false: Auto paging is disabled.\r\n *
    • \r\n *
    • \r\n * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly\r\n * slice text in half, making it difficult to read.\r\n *
    • \r\n *
    • \r\n * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting\r\n * mostly of a single column of text.\r\n *
    • \r\n *
    \r\n * @name Context2D#autoPaging\r\n * @type {boolean|\"slice\"|\"text\"}\r\n * @default false\r\n */\r\n Object.defineProperty(this, \"autoPaging\", {\r\n get: function() {\r\n return _autoPaging;\r\n },\r\n set: function(value) {\r\n _autoPaging = value;\r\n }\r\n });\r\n\r\n var lastBreak = 0;\r\n /**\r\n * @name lastBreak\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"lastBreak\", {\r\n get: function() {\r\n return lastBreak;\r\n },\r\n set: function(value) {\r\n lastBreak = value;\r\n }\r\n });\r\n\r\n var pageBreaks = [];\r\n /**\r\n * Y Position of page breaks.\r\n * @name pageBreaks\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"pageBreaks\", {\r\n get: function() {\r\n return pageBreaks;\r\n },\r\n set: function(value) {\r\n pageBreaks = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name ctx\r\n * @type {object}\r\n * @default {}\r\n */\r\n Object.defineProperty(this, \"ctx\", {\r\n get: function() {\r\n return _ctx;\r\n },\r\n set: function(value) {\r\n if (value instanceof ContextLayer) {\r\n _ctx = value;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * @name path\r\n * @type {array}\r\n * @default []\r\n */\r\n Object.defineProperty(this, \"path\", {\r\n get: function() {\r\n return _ctx.path;\r\n },\r\n set: function(value) {\r\n _ctx.path = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name ctxStack\r\n * @type {array}\r\n * @default []\r\n */\r\n var _ctxStack = [];\r\n Object.defineProperty(this, \"ctxStack\", {\r\n get: function() {\r\n return _ctxStack;\r\n },\r\n set: function(value) {\r\n _ctxStack = value;\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n *\r\n * @name fillStyle\r\n * @default #000000\r\n * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000
    \r\n * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)
    \r\n * A pattern object to use to fill the drawing (not supported by context2d)\r\n */\r\n Object.defineProperty(this, \"fillStyle\", {\r\n get: function() {\r\n return this.ctx.fillStyle;\r\n },\r\n set: function(value) {\r\n var rgba;\r\n rgba = getRGBA(value);\r\n\r\n this.ctx.fillStyle = rgba.style;\r\n this.ctx.isFillTransparent = rgba.a === 0;\r\n this.ctx.fillOpacity = rgba.a;\r\n\r\n this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the color, gradient, or pattern used for strokes\r\n *\r\n * @name strokeStyle\r\n * @default #000000\r\n * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n */\r\n Object.defineProperty(this, \"strokeStyle\", {\r\n get: function() {\r\n return this.ctx.strokeStyle;\r\n },\r\n set: function(value) {\r\n var rgba = getRGBA(value);\r\n\r\n this.ctx.strokeStyle = rgba.style;\r\n this.ctx.isStrokeTransparent = rgba.a === 0;\r\n this.ctx.strokeOpacity = rgba.a;\r\n\r\n if (rgba.a === 0) {\r\n this.pdf.setDrawColor(255, 255, 255);\r\n } else if (rgba.a === 1) {\r\n this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n } else {\r\n this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the style of the end caps for a line\r\n *\r\n * @name lineCap\r\n * @default butt\r\n * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line
    \r\n * round A rounded end cap is added to each end of the line
    \r\n * square A square end cap is added to each end of the line
    \r\n */\r\n Object.defineProperty(this, \"lineCap\", {\r\n get: function() {\r\n return this.ctx.lineCap;\r\n },\r\n set: function(value) {\r\n if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n this.ctx.lineCap = value;\r\n this.pdf.setLineCap(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the current line width\r\n *\r\n * @name lineWidth\r\n * @default 1\r\n * @property {number} lineWidth The current line width, in pixels\r\n */\r\n Object.defineProperty(this, \"lineWidth\", {\r\n get: function() {\r\n return this.ctx.lineWidth;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n this.ctx.lineWidth = value;\r\n this.pdf.setLineWidth(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the type of corner created, when two lines meet\r\n */\r\n Object.defineProperty(this, \"lineJoin\", {\r\n get: function() {\r\n return this.ctx.lineJoin;\r\n },\r\n set: function(value) {\r\n if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n this.ctx.lineJoin = value;\r\n this.pdf.setLineJoin(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n *\r\n * @name miterLimit\r\n * @default 10\r\n */\r\n Object.defineProperty(this, \"miterLimit\", {\r\n get: function() {\r\n return this.ctx.miterLimit;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n this.ctx.miterLimit = value;\r\n this.pdf.setMiterLimit(value);\r\n }\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"textBaseline\", {\r\n get: function() {\r\n return this.ctx.textBaseline;\r\n },\r\n set: function(value) {\r\n this.ctx.textBaseline = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"textAlign\", {\r\n get: function() {\r\n return this.ctx.textAlign;\r\n },\r\n set: function(value) {\r\n if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n this.ctx.textAlign = value;\r\n }\r\n }\r\n });\r\n\r\n var _fontFaceMap = null;\r\n\r\n function getFontFaceMap(pdf, fontFaces) {\r\n if (_fontFaceMap === null) {\r\n var fontMap = pdf.getFontList();\r\n\r\n var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n }\r\n\r\n return _fontFaceMap;\r\n }\r\n\r\n function convertToFontFaces(fontMap) {\r\n var fontFaces = [];\r\n\r\n Object.keys(fontMap).forEach(function(family) {\r\n var styles = fontMap[family];\r\n\r\n styles.forEach(function(style) {\r\n var fontFace = null;\r\n\r\n switch (style) {\r\n case \"bold\":\r\n fontFace = {\r\n family: family,\r\n weight: \"bold\"\r\n };\r\n break;\r\n\r\n case \"italic\":\r\n fontFace = {\r\n family: family,\r\n style: \"italic\"\r\n };\r\n break;\r\n\r\n case \"bolditalic\":\r\n fontFace = {\r\n family: family,\r\n weight: \"bold\",\r\n style: \"italic\"\r\n };\r\n break;\r\n\r\n case \"\":\r\n case \"normal\":\r\n fontFace = {\r\n family: family\r\n };\r\n break;\r\n }\r\n\r\n // If font-face is still null here, it is a font with some styling we don't recognize and\r\n // cannot map or it is a font added via the fontFaces option of .html().\r\n if (fontFace !== null) {\r\n fontFace.ref = {\r\n name: family,\r\n style: style\r\n };\r\n\r\n fontFaces.push(fontFace);\r\n }\r\n });\r\n });\r\n\r\n return fontFaces;\r\n }\r\n\r\n var _fontFaces = null;\r\n /**\r\n * A map of available font-faces, as passed in the options of\r\n * .html(). If set a limited implementation of the font style matching\r\n * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n * will be used. If not set it will fallback to previous behavior.\r\n */\r\n\r\n Object.defineProperty(this, \"fontFaces\", {\r\n get: function() {\r\n return _fontFaces;\r\n },\r\n set: function(value) {\r\n _fontFaceMap = null;\r\n _fontFaces = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"font\", {\r\n get: function() {\r\n return this.ctx.font;\r\n },\r\n set: function(value) {\r\n this.ctx.font = value;\r\n var rx, matches;\r\n\r\n //source: https://stackoverflow.com/a/10136041\r\n // eslint-disable-next-line no-useless-escape\r\n rx = /^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-_,\\\"\\'\\sa-z]+?)\\s*$/i;\r\n matches = rx.exec(value);\r\n if (matches !== null) {\r\n var fontStyle = matches[1];\r\n var fontVariant = matches[2];\r\n var fontWeight = matches[3];\r\n var fontSize = matches[4];\r\n var lineHeight = matches[5];\r\n var fontFamily = matches[6];\r\n } else {\r\n return;\r\n }\r\n var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n if (\"px\" === fontSizeUnit) {\r\n fontSize = Math.floor(\r\n parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n );\r\n } else if (\"em\" === fontSizeUnit) {\r\n fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n } else {\r\n fontSize = Math.floor(\r\n parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n );\r\n }\r\n\r\n this.pdf.setFontSize(fontSize);\r\n var parts = parseFontFamily(fontFamily);\r\n\r\n if (this.fontFaces) {\r\n var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n var rules = parts.map(function(ff) {\r\n return {\r\n family: ff,\r\n stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n weight: fontWeight,\r\n style: fontStyle\r\n };\r\n });\r\n\r\n var font = resolveFontFace(fontFaceMap, rules);\r\n this.pdf.setFont(font.ref.name, font.ref.style);\r\n return;\r\n }\r\n\r\n var style = \"\";\r\n if (\r\n fontWeight === \"bold\" ||\r\n parseInt(fontWeight, 10) >= 700 ||\r\n fontStyle === \"bold\"\r\n ) {\r\n style = \"bold\";\r\n }\r\n\r\n if (fontStyle === \"italic\") {\r\n style += \"italic\";\r\n }\r\n\r\n if (style.length === 0) {\r\n style = \"normal\";\r\n }\r\n var jsPdfFontName = \"\";\r\n\r\n var fallbackFonts = {\r\n arial: \"Helvetica\",\r\n Arial: \"Helvetica\",\r\n verdana: \"Helvetica\",\r\n Verdana: \"Helvetica\",\r\n helvetica: \"Helvetica\",\r\n Helvetica: \"Helvetica\",\r\n \"sans-serif\": \"Helvetica\",\r\n fixed: \"Courier\",\r\n monospace: \"Courier\",\r\n terminal: \"Courier\",\r\n cursive: \"Times\",\r\n fantasy: \"Times\",\r\n serif: \"Times\"\r\n };\r\n\r\n for (var i = 0; i < parts.length; i++) {\r\n if (\r\n this.pdf.internal.getFont(parts[i], style, {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n break;\r\n } else if (\r\n style === \"bolditalic\" &&\r\n this.pdf.internal.getFont(parts[i], \"bold\", {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n style = \"bold\";\r\n } else if (\r\n this.pdf.internal.getFont(parts[i], \"normal\", {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n style = \"normal\";\r\n break;\r\n }\r\n }\r\n if (jsPdfFontName === \"\") {\r\n for (var j = 0; j < parts.length; j++) {\r\n if (fallbackFonts[parts[j]]) {\r\n jsPdfFontName = fallbackFonts[parts[j]];\r\n break;\r\n }\r\n }\r\n }\r\n jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n this.pdf.setFont(jsPdfFontName, style);\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"globalCompositeOperation\", {\r\n get: function() {\r\n return this.ctx.globalCompositeOperation;\r\n },\r\n set: function(value) {\r\n this.ctx.globalCompositeOperation = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"globalAlpha\", {\r\n get: function() {\r\n return this.ctx.globalAlpha;\r\n },\r\n set: function(value) {\r\n this.ctx.globalAlpha = value;\r\n }\r\n });\r\n\r\n /**\r\n * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n *\r\n * @name lineDashOffset\r\n * @default 0.0\r\n */\r\n Object.defineProperty(this, \"lineDashOffset\", {\r\n get: function() {\r\n return this.ctx.lineDashOffset;\r\n },\r\n set: function(value) {\r\n this.ctx.lineDashOffset = value;\r\n setLineDash.call(this);\r\n }\r\n });\r\n\r\n // Not HTML API\r\n Object.defineProperty(this, \"lineDash\", {\r\n get: function() {\r\n return this.ctx.lineDash;\r\n },\r\n set: function(value) {\r\n this.ctx.lineDash = value;\r\n setLineDash.call(this);\r\n }\r\n });\r\n\r\n // Not HTML API\r\n Object.defineProperty(this, \"ignoreClearRect\", {\r\n get: function() {\r\n return this.ctx.ignoreClearRect;\r\n },\r\n set: function(value) {\r\n this.ctx.ignoreClearRect = Boolean(value);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Sets the line dash pattern used when stroking lines.\r\n * @name setLineDash\r\n * @function\r\n * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n */\r\n Context2D.prototype.setLineDash = function(dashArray) {\r\n this.lineDash = dashArray;\r\n };\r\n\r\n /**\r\n * gets the current line dash pattern.\r\n * @name getLineDash\r\n * @function\r\n * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n */\r\n Context2D.prototype.getLineDash = function() {\r\n if (this.lineDash.length % 2) {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n return this.lineDash.concat(this.lineDash);\r\n } else {\r\n // The copied value is returned to prevent contamination from outside.\r\n return this.lineDash.slice();\r\n }\r\n };\r\n\r\n Context2D.prototype.fill = function() {\r\n pathPreProcess.call(this, \"fill\", false);\r\n };\r\n\r\n /**\r\n * Actually draws the path you have defined\r\n *\r\n * @name stroke\r\n * @function\r\n * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n */\r\n Context2D.prototype.stroke = function() {\r\n pathPreProcess.call(this, \"stroke\", false);\r\n };\r\n\r\n /**\r\n * Begins a path, or resets the current\r\n *\r\n * @name beginPath\r\n * @function\r\n * @description The beginPath() method begins a path, or resets the current path.\r\n */\r\n Context2D.prototype.beginPath = function() {\r\n this.path = [\r\n {\r\n type: \"begin\"\r\n }\r\n ];\r\n };\r\n\r\n /**\r\n * Moves the path to the specified point in the canvas, without creating a line\r\n *\r\n * @name moveTo\r\n * @function\r\n * @param x {Number} The x-coordinate of where to move the path to\r\n * @param y {Number} The y-coordinate of where to move the path to\r\n */\r\n Context2D.prototype.moveTo = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n }\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n this.path.push({\r\n type: \"mt\",\r\n x: pt.x,\r\n y: pt.y\r\n });\r\n this.ctx.lastPoint = new Point(x, y);\r\n };\r\n\r\n /**\r\n * Creates a path from the current point back to the starting point\r\n *\r\n * @name closePath\r\n * @function\r\n * @description The closePath() method creates a path from the current point back to the starting point.\r\n */\r\n Context2D.prototype.closePath = function() {\r\n var pathBegin = new Point(0, 0);\r\n var i = 0;\r\n for (i = this.path.length - 1; i !== -1; i--) {\r\n if (this.path[i].type === \"begin\") {\r\n if (\r\n typeof this.path[i + 1] === \"object\" &&\r\n typeof this.path[i + 1].x === \"number\"\r\n ) {\r\n pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n break;\r\n }\r\n }\r\n }\r\n this.path.push({\r\n type: \"close\"\r\n });\r\n this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n };\r\n\r\n /**\r\n * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n *\r\n * @name lineTo\r\n * @function\r\n * @param x The x-coordinate of where to create the line to\r\n * @param y The y-coordinate of where to create the line to\r\n * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n */\r\n Context2D.prototype.lineTo = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n }\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n this.path.push({\r\n type: \"lt\",\r\n x: pt.x,\r\n y: pt.y\r\n });\r\n this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n };\r\n\r\n /**\r\n * Clips a region of any shape and size from the original canvas\r\n *\r\n * @name clip\r\n * @function\r\n * @description The clip() method clips a region of any shape and size from the original canvas.\r\n */\r\n Context2D.prototype.clip = function() {\r\n this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n pathPreProcess.call(this, null, true);\r\n };\r\n\r\n /**\r\n * Creates a cubic Bézier curve\r\n *\r\n * @name quadraticCurveTo\r\n * @function\r\n * @param cpx {Number} The x-coordinate of the Bézier control point\r\n * @param cpy {Number} The y-coordinate of the Bézier control point\r\n * @param x {Number} The x-coordinate of the ending point\r\n * @param y {Number} The y-coordinate of the ending point\r\n * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.

    A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n */\r\n Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n console.error(\r\n \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n );\r\n }\r\n\r\n var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n this.path.push({\r\n type: \"qct\",\r\n x1: pt1.x,\r\n y1: pt1.y,\r\n x: pt0.x,\r\n y: pt0.y\r\n });\r\n this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n };\r\n\r\n /**\r\n * Creates a cubic Bézier curve\r\n *\r\n * @name bezierCurveTo\r\n * @function\r\n * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n * @param x {Number} The x-coordinate of the ending point\r\n * @param y {Number} The y-coordinate of the ending point\r\n * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve.

    A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n */\r\n Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(cp1x) ||\r\n isNaN(cp1y) ||\r\n isNaN(cp2x) ||\r\n isNaN(cp2y)\r\n ) {\r\n console.error(\r\n \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n );\r\n }\r\n var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n this.path.push({\r\n type: \"bct\",\r\n x1: pt1.x,\r\n y1: pt1.y,\r\n x2: pt2.x,\r\n y2: pt2.y,\r\n x: pt0.x,\r\n y: pt0.y\r\n });\r\n this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n };\r\n\r\n /**\r\n * Creates an arc/curve (used to create circles, or parts of circles)\r\n *\r\n * @name arc\r\n * @function\r\n * @param x {Number} The x-coordinate of the center of the circle\r\n * @param y {Number} The y-coordinate of the center of the circle\r\n * @param radius {Number} The radius of the circle\r\n * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n * @param endAngle {Number} The ending angle, in radians\r\n * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n */\r\n Context2D.prototype.arc = function(\r\n x,\r\n y,\r\n radius,\r\n startAngle,\r\n endAngle,\r\n counterclockwise\r\n ) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(radius) ||\r\n isNaN(startAngle) ||\r\n isNaN(endAngle)\r\n ) {\r\n console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n }\r\n counterclockwise = Boolean(counterclockwise);\r\n\r\n if (!this.ctx.transform.isIdentity) {\r\n var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n x = xpt.x;\r\n y = xpt.y;\r\n\r\n var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n radius = Math.sqrt(\r\n Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n );\r\n }\r\n if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n startAngle = 0;\r\n endAngle = 2 * Math.PI;\r\n }\r\n\r\n this.path.push({\r\n type: \"arc\",\r\n x: x,\r\n y: y,\r\n radius: radius,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n counterclockwise: counterclockwise\r\n });\r\n // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n };\r\n\r\n /**\r\n * Creates an arc/curve between two tangents\r\n *\r\n * @name arcTo\r\n * @function\r\n * @param x1 {Number} The x-coordinate of the first tangent\r\n * @param y1 {Number} The y-coordinate of the first tangent\r\n * @param x2 {Number} The x-coordinate of the second tangent\r\n * @param y2 {Number} The y-coordinate of the second tangent\r\n * @param radius The radius of the arc\r\n * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n throw new Error(\"arcTo not implemented.\");\r\n };\r\n\r\n /**\r\n * Creates a rectangle\r\n *\r\n * @name rect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The rect() method creates a rectangle.\r\n */\r\n Context2D.prototype.rect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n }\r\n this.moveTo(x, y);\r\n this.lineTo(x + w, y);\r\n this.lineTo(x + w, y + h);\r\n this.lineTo(x, y + h);\r\n this.lineTo(x, y);\r\n this.lineTo(x + w, y);\r\n this.lineTo(x, y);\r\n };\r\n\r\n /**\r\n * Draws a \"filled\" rectangle\r\n *\r\n * @name fillRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n */\r\n Context2D.prototype.fillRect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n }\r\n if (isFillTransparent.call(this)) {\r\n return;\r\n }\r\n var tmp = {};\r\n if (this.lineCap !== \"butt\") {\r\n tmp.lineCap = this.lineCap;\r\n this.lineCap = \"butt\";\r\n }\r\n if (this.lineJoin !== \"miter\") {\r\n tmp.lineJoin = this.lineJoin;\r\n this.lineJoin = \"miter\";\r\n }\r\n\r\n this.beginPath();\r\n this.rect(x, y, w, h);\r\n this.fill();\r\n\r\n if (tmp.hasOwnProperty(\"lineCap\")) {\r\n this.lineCap = tmp.lineCap;\r\n }\r\n if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n this.lineJoin = tmp.lineJoin;\r\n }\r\n };\r\n\r\n /**\r\n * Draws a rectangle (no fill)\r\n *\r\n * @name strokeRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n */\r\n Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n }\r\n if (isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n this.beginPath();\r\n this.rect(x, y, w, h);\r\n this.stroke();\r\n };\r\n\r\n /**\r\n * Clears the specified pixels within a given rectangle\r\n *\r\n * @name clearRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle to clear, in pixels\r\n * @param h {Number} The height of the rectangle to clear, in pixels\r\n * @description We cannot clear PDF commands that were already written to PDF, so we use white instead.
    \r\n * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n *\r\n */\r\n Context2D.prototype.clearRect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n }\r\n if (this.ignoreClearRect) {\r\n return;\r\n }\r\n\r\n this.fillStyle = \"#ffffff\";\r\n this.fillRect(x, y, w, h);\r\n };\r\n\r\n /**\r\n * Saves the state of the current context\r\n *\r\n * @name save\r\n * @function\r\n */\r\n Context2D.prototype.save = function(doStackPush) {\r\n doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n this.pdf.setPage(i + 1);\r\n this.pdf.internal.out(\"q\");\r\n }\r\n this.pdf.setPage(tmpPageNumber);\r\n\r\n if (doStackPush) {\r\n this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n var ctx = new ContextLayer(this.ctx);\r\n this.ctxStack.push(this.ctx);\r\n this.ctx = ctx;\r\n }\r\n };\r\n\r\n /**\r\n * Returns previously saved path state and attributes\r\n *\r\n * @name restore\r\n * @function\r\n */\r\n Context2D.prototype.restore = function(doStackPop) {\r\n doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n this.pdf.setPage(i + 1);\r\n this.pdf.internal.out(\"Q\");\r\n }\r\n this.pdf.setPage(tmpPageNumber);\r\n\r\n if (doStackPop && this.ctxStack.length !== 0) {\r\n this.ctx = this.ctxStack.pop();\r\n this.fillStyle = this.ctx.fillStyle;\r\n this.strokeStyle = this.ctx.strokeStyle;\r\n this.font = this.ctx.font;\r\n this.lineCap = this.ctx.lineCap;\r\n this.lineWidth = this.ctx.lineWidth;\r\n this.lineJoin = this.ctx.lineJoin;\r\n this.lineDash = this.ctx.lineDash;\r\n this.lineDashOffset = this.ctx.lineDashOffset;\r\n }\r\n };\r\n\r\n /**\r\n * @name toDataURL\r\n * @function\r\n */\r\n Context2D.prototype.toDataURL = function() {\r\n throw new Error(\"toDataUrl not implemented.\");\r\n };\r\n\r\n //helper functions\r\n\r\n /**\r\n * Get the decimal values of r, g, b and a\r\n *\r\n * @name getRGBA\r\n * @function\r\n * @private\r\n * @ignore\r\n */\r\n var getRGBA = function(style) {\r\n var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n var r, g, b, a;\r\n\r\n if (style.isCanvasGradient === true) {\r\n style = style.getColor();\r\n }\r\n\r\n if (!style) {\r\n return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n }\r\n\r\n if (rxTransparent.test(style)) {\r\n r = 0;\r\n g = 0;\r\n b = 0;\r\n a = 0;\r\n } else {\r\n var matches = rxRgb.exec(style);\r\n if (matches !== null) {\r\n r = parseInt(matches[1]);\r\n g = parseInt(matches[2]);\r\n b = parseInt(matches[3]);\r\n a = 1;\r\n } else {\r\n matches = rxRgba.exec(style);\r\n if (matches !== null) {\r\n r = parseInt(matches[1]);\r\n g = parseInt(matches[2]);\r\n b = parseInt(matches[3]);\r\n a = parseFloat(matches[4]);\r\n } else {\r\n a = 1;\r\n\r\n if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n var rgbColor = new RGBColor(style);\r\n if (rgbColor.ok) {\r\n style = rgbColor.toHex();\r\n } else {\r\n style = \"#000000\";\r\n }\r\n }\r\n\r\n if (style.length === 4) {\r\n r = style.substring(1, 2);\r\n r += r;\r\n g = style.substring(2, 3);\r\n g += g;\r\n b = style.substring(3, 4);\r\n b += b;\r\n } else {\r\n r = style.substring(1, 3);\r\n g = style.substring(3, 5);\r\n b = style.substring(5, 7);\r\n }\r\n r = parseInt(r, 16);\r\n g = parseInt(g, 16);\r\n b = parseInt(b, 16);\r\n }\r\n }\r\n }\r\n return { r: r, g: g, b: b, a: a, style: style };\r\n };\r\n\r\n /**\r\n * @name isFillTransparent\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns {Boolean}\r\n */\r\n var isFillTransparent = function() {\r\n return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n };\r\n\r\n /**\r\n * @name isStrokeTransparent\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns {Boolean}\r\n */\r\n var isStrokeTransparent = function() {\r\n return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n };\r\n\r\n /**\r\n * Draws \"filled\" text on the canvas\r\n *\r\n * @name fillText\r\n * @function\r\n * @param text {String} Specifies the text that will be written on the canvas\r\n * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n */\r\n Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n }\r\n maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n if (isFillTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n // We only use X axis as scale hint\r\n var scale = this.ctx.transform.scaleX;\r\n\r\n putText.call(this, {\r\n text: text,\r\n x: x,\r\n y: y,\r\n scale: scale,\r\n angle: degs,\r\n align: this.textAlign,\r\n maxWidth: maxWidth\r\n });\r\n };\r\n\r\n /**\r\n * Draws text on the canvas (no fill)\r\n *\r\n * @name strokeText\r\n * @function\r\n * @param text {String} Specifies the text that will be written on the canvas\r\n * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n */\r\n Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n }\r\n if (isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n var degs = rad2deg(this.ctx.transform.rotation);\r\n var scale = this.ctx.transform.scaleX;\r\n\r\n putText.call(this, {\r\n text: text,\r\n x: x,\r\n y: y,\r\n scale: scale,\r\n renderingMode: \"stroke\",\r\n angle: degs,\r\n align: this.textAlign,\r\n maxWidth: maxWidth\r\n });\r\n };\r\n\r\n /**\r\n * Returns an object that contains the width of the specified text\r\n *\r\n * @name measureText\r\n * @function\r\n * @param text {String} The text to be measured\r\n * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n * @returns {Number}\r\n */\r\n Context2D.prototype.measureText = function(text) {\r\n if (typeof text !== \"string\") {\r\n console.error(\r\n \"jsPDF.context2d.measureText: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n );\r\n }\r\n var pdf = this.pdf;\r\n var k = this.pdf.internal.scaleFactor;\r\n\r\n var fontSize = pdf.internal.getFontSize();\r\n var txtWidth =\r\n (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n var TextMetrics = function(options) {\r\n options = options || {};\r\n var _width = options.width || 0;\r\n Object.defineProperty(this, \"width\", {\r\n get: function() {\r\n return _width;\r\n }\r\n });\r\n return this;\r\n };\r\n return new TextMetrics({ width: txtWidth });\r\n };\r\n\r\n //Transformations\r\n\r\n /**\r\n * Scales the current drawing bigger or smaller\r\n *\r\n * @name scale\r\n * @function\r\n * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n * @description The scale() method scales the current drawing, bigger or smaller.\r\n */\r\n Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n }\r\n var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Rotates the current drawing\r\n *\r\n * @name rotate\r\n * @function\r\n * @param angle {Number} The rotation angle, in radians.\r\n * @description To calculate from degrees to radians: degrees*Math.PI/180.
    \r\n * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n */\r\n Context2D.prototype.rotate = function(angle) {\r\n if (isNaN(angle)) {\r\n console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n }\r\n var matrix = new Matrix(\r\n Math.cos(angle),\r\n Math.sin(angle),\r\n -Math.sin(angle),\r\n Math.cos(angle),\r\n 0.0,\r\n 0.0\r\n );\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Remaps the (0,0) position on the canvas\r\n *\r\n * @name translate\r\n * @function\r\n * @param x {Number} The value to add to horizontal (x) coordinates\r\n * @param y {Number} The value to add to vertical (y) coordinates\r\n * @description The translate() method remaps the (0,0) position on the canvas.\r\n */\r\n Context2D.prototype.translate = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n }\r\n var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Replaces the current transformation matrix for the drawing\r\n *\r\n * @name transform\r\n * @function\r\n * @param a {Number} Horizontal scaling\r\n * @param b {Number} Horizontal skewing\r\n * @param c {Number} Vertical skewing\r\n * @param d {Number} Vertical scaling\r\n * @param e {Number} Horizontal moving\r\n * @param f {Number} Vertical moving\r\n * @description Each object on the canvas has a current transformation matrix.

    The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:



    a c e

    b d f

    0 0 1

    In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n */\r\n Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n }\r\n var matrix = new Matrix(a, b, c, d, e, f);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Resets the current transform to the identity matrix. Then runs transform()\r\n *\r\n * @name setTransform\r\n * @function\r\n * @param a {Number} Horizontal scaling\r\n * @param b {Number} Horizontal skewing\r\n * @param c {Number} Vertical skewing\r\n * @param d {Number} Vertical scaling\r\n * @param e {Number} Horizontal moving\r\n * @param f {Number} Vertical moving\r\n * @description Each object on the canvas has a current transformation matrix.

    The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.

    In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n */\r\n Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n a = isNaN(a) ? 1 : a;\r\n b = isNaN(b) ? 0 : b;\r\n c = isNaN(c) ? 0 : c;\r\n d = isNaN(d) ? 1 : d;\r\n e = isNaN(e) ? 0 : e;\r\n f = isNaN(f) ? 0 : f;\r\n this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n };\r\n\r\n /**\r\n * Should only be used if pageWrapYEnabled is true\r\n *\r\n * @name setPageByYPosition\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns One-based Page Number\r\n */\r\n var setPageByYPosition = function(y) {\r\n if (this.pageWrapYEnabled) {\r\n this.lastBreak = 0;\r\n var manualBreaks = 0;\r\n var autoBreaks = 0;\r\n for (var i = 0; i < this.pageBreaks.length; i++) {\r\n if (y >= this.pageBreaks[i]) {\r\n manualBreaks++;\r\n if (this.lastBreak === 0) {\r\n autoBreaks++;\r\n }\r\n var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n this.lastBreak = this.pageBreaks[i];\r\n var pagesSinceLastBreak = Math.floor(\r\n spaceBetweenLastBreak / this.pageWrapY\r\n );\r\n autoBreaks += pagesSinceLastBreak;\r\n }\r\n }\r\n if (this.lastBreak === 0) {\r\n var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n autoBreaks += pagesSinceLastBreak;\r\n }\r\n return autoBreaks + manualBreaks;\r\n } else {\r\n return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n }\r\n };\r\n\r\n var hasMargins = function() {\r\n return (\r\n this.margin[0] > 0 ||\r\n this.margin[1] > 0 ||\r\n this.margin[2] > 0 ||\r\n this.margin[3] > 0\r\n );\r\n };\r\n\r\n /**\r\n * Draws an image, canvas, or video onto the canvas\r\n *\r\n * @function\r\n * @param img {} Specifies the image, canvas, or video element to use\r\n * @param sx {Number} Optional. The x coordinate where to start clipping\r\n * @param sy {Number} Optional. The y coordinate where to start clipping\r\n * @param swidth {Number} Optional. The width of the clipped image\r\n * @param sheight {Number} Optional. The height of the clipped image\r\n * @param x {Number} The x coordinate where to place the image on the canvas\r\n * @param y {Number} The y coordinate where to place the image on the canvas\r\n * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n */\r\n Context2D.prototype.drawImage = function(\r\n img,\r\n sx,\r\n sy,\r\n swidth,\r\n sheight,\r\n x,\r\n y,\r\n width,\r\n height\r\n ) {\r\n var imageProperties = this.pdf.getImageProperties(img);\r\n var factorX = 1;\r\n var factorY = 1;\r\n var isClip;\r\n\r\n var clipFactorX = 1;\r\n var clipFactorY = 1;\r\n\r\n if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n isClip = true;\r\n clipFactorX = width / swidth;\r\n clipFactorY = height / sheight;\r\n factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n }\r\n\r\n //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n if (typeof x === \"undefined\") {\r\n x = sx;\r\n y = sy;\r\n sx = 0;\r\n sy = 0;\r\n }\r\n\r\n if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n width = swidth;\r\n height = sheight;\r\n }\r\n if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n width = imageProperties.width;\r\n height = imageProperties.height;\r\n }\r\n\r\n var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n var matrix = new Matrix();\r\n matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n var xRect = matrix.applyToRectangle(\r\n new Rectangle(\r\n x - sx * clipFactorX,\r\n y - sy * clipFactorY,\r\n swidth * factorX,\r\n sheight * factorY\r\n )\r\n );\r\n var pageArray = getPagesByPath.call(this, xRect);\r\n var pages = [];\r\n for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n if (pages.indexOf(pageArray[ii]) === -1) {\r\n pages.push(pageArray[ii]);\r\n }\r\n }\r\n\r\n sortPages(pages);\r\n\r\n var clipPath;\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var i = min; i < max + 1; i++) {\r\n this.pdf.setPage(i);\r\n\r\n var pageWidthMinusMargins =\r\n this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusMargins =\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var previousPageHeightSum =\r\n i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n drawPaths.call(this, \"fill\", true);\r\n this.path = tmpPaths;\r\n }\r\n var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n tmpRect = pathPositionRedo(\r\n [tmpRect],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n this.pdf.addImage(\r\n img,\r\n \"JPEG\",\r\n tmpRect.x,\r\n tmpRect.y,\r\n tmpRect.w,\r\n tmpRect.h,\r\n null,\r\n null,\r\n angle\r\n );\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n } else {\r\n this.pdf.addImage(\r\n img,\r\n \"JPEG\",\r\n xRect.x,\r\n xRect.y,\r\n xRect.w,\r\n xRect.h,\r\n null,\r\n null,\r\n angle\r\n );\r\n }\r\n };\r\n\r\n var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n var result = [];\r\n pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n pageWrapY =\r\n pageWrapY ||\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n switch (path.type) {\r\n default:\r\n case \"mt\":\r\n case \"lt\":\r\n result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n break;\r\n case \"arc\":\r\n result.push(\r\n Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n );\r\n break;\r\n case \"qct\":\r\n var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n this.ctx.lastPoint.x,\r\n this.ctx.lastPoint.y,\r\n path.x1,\r\n path.y1,\r\n path.x,\r\n path.y\r\n );\r\n result.push(\r\n Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor(\r\n (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n pageWrapY\r\n ) + 1\r\n );\r\n break;\r\n case \"bct\":\r\n var rectOfBezierCurve = getBezierCurveBoundary(\r\n this.ctx.lastPoint.x,\r\n this.ctx.lastPoint.y,\r\n path.x1,\r\n path.y1,\r\n path.x2,\r\n path.y2,\r\n path.x,\r\n path.y\r\n );\r\n result.push(\r\n Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor(\r\n (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n ) + 1\r\n );\r\n break;\r\n case \"rect\":\r\n result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n }\r\n\r\n for (var i = 0; i < result.length; i += 1) {\r\n while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n addPage.call(this);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n var addPage = function() {\r\n var fillStyle = this.fillStyle;\r\n var strokeStyle = this.strokeStyle;\r\n var font = this.font;\r\n var lineCap = this.lineCap;\r\n var lineWidth = this.lineWidth;\r\n var lineJoin = this.lineJoin;\r\n this.pdf.addPage();\r\n this.fillStyle = fillStyle;\r\n this.strokeStyle = strokeStyle;\r\n this.font = font;\r\n this.lineCap = lineCap;\r\n this.lineWidth = lineWidth;\r\n this.lineJoin = lineJoin;\r\n };\r\n\r\n var pathPositionRedo = function(paths, x, y) {\r\n for (var i = 0; i < paths.length; i++) {\r\n switch (paths[i].type) {\r\n case \"bct\":\r\n paths[i].x2 += x;\r\n paths[i].y2 += y;\r\n case \"qct\":\r\n paths[i].x1 += x;\r\n paths[i].y1 += y;\r\n case \"mt\":\r\n case \"lt\":\r\n case \"arc\":\r\n default:\r\n paths[i].x += x;\r\n paths[i].y += y;\r\n }\r\n }\r\n return paths;\r\n };\r\n\r\n var sortPages = function(pages) {\r\n return pages.sort(function(a, b) {\r\n return a - b;\r\n });\r\n };\r\n\r\n var pathPreProcess = function(rule, isClip) {\r\n var fillStyle = this.fillStyle;\r\n var strokeStyle = this.strokeStyle;\r\n var lineCap = this.lineCap;\r\n var oldLineWidth = this.lineWidth;\r\n var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n var lineJoin = this.lineJoin;\r\n\r\n var origPath = JSON.parse(JSON.stringify(this.path));\r\n var xPath = JSON.parse(JSON.stringify(this.path));\r\n var clipPath;\r\n var tmpPath;\r\n var pages = [];\r\n\r\n for (var i = 0; i < xPath.length; i++) {\r\n if (typeof xPath[i].x !== \"undefined\") {\r\n var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n for (var ii = 0; ii < page.length; ii += 1) {\r\n if (pages.indexOf(page[ii]) === -1) {\r\n pages.push(page[ii]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (var j = 0; j < pages.length; j++) {\r\n while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n addPage.call(this);\r\n }\r\n }\r\n sortPages(pages);\r\n\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var k = min; k < max + 1; k++) {\r\n this.pdf.setPage(k);\r\n\r\n this.fillStyle = fillStyle;\r\n this.strokeStyle = strokeStyle;\r\n this.lineCap = lineCap;\r\n this.lineWidth = lineWidth;\r\n this.lineJoin = lineJoin;\r\n\r\n var pageWidthMinusMargins =\r\n this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusMargins =\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var previousPageHeightSum =\r\n k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n drawPaths.call(this, rule, true);\r\n this.path = tmpPaths;\r\n }\r\n tmpPath = JSON.parse(JSON.stringify(origPath));\r\n this.path = pathPositionRedo(\r\n tmpPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n if (isClip === false || k === 0) {\r\n const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n drawPaths.call(this, rule, isClip);\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n this.lineWidth = oldLineWidth;\r\n }\r\n } else {\r\n this.lineWidth = lineWidth;\r\n drawPaths.call(this, rule, isClip);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n this.path = origPath;\r\n };\r\n\r\n /**\r\n * Processes the paths\r\n *\r\n * @function\r\n * @param rule {String}\r\n * @param isClip {Boolean}\r\n * @private\r\n * @ignore\r\n */\r\n var drawPaths = function(rule, isClip) {\r\n if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n var moves = [];\r\n\r\n //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n var delta;\r\n var xPath = this.path;\r\n for (var i = 0; i < xPath.length; i++) {\r\n var pt = xPath[i];\r\n\r\n switch (pt.type) {\r\n case \"begin\":\r\n moves.push({\r\n begin: true\r\n });\r\n break;\r\n\r\n case \"close\":\r\n moves.push({\r\n close: true\r\n });\r\n break;\r\n\r\n case \"mt\":\r\n moves.push({\r\n start: pt,\r\n deltas: [],\r\n abs: []\r\n });\r\n break;\r\n\r\n case \"lt\":\r\n var iii = moves.length;\r\n if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n if (iii > 0) {\r\n for (iii; iii >= 0; iii--) {\r\n if (\r\n moves[iii - 1].close !== true &&\r\n moves[iii - 1].begin !== true\r\n ) {\r\n moves[iii - 1].deltas.push(delta);\r\n moves[iii - 1].abs.push(pt);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case \"bct\":\r\n delta = [\r\n pt.x1 - xPath[i - 1].x,\r\n pt.y1 - xPath[i - 1].y,\r\n pt.x2 - xPath[i - 1].x,\r\n pt.y2 - xPath[i - 1].y,\r\n pt.x - xPath[i - 1].x,\r\n pt.y - xPath[i - 1].y\r\n ];\r\n moves[moves.length - 1].deltas.push(delta);\r\n break;\r\n\r\n case \"qct\":\r\n var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n var x3 = pt.x;\r\n var y3 = pt.y;\r\n delta = [\r\n x1 - xPath[i - 1].x,\r\n y1 - xPath[i - 1].y,\r\n x2 - xPath[i - 1].x,\r\n y2 - xPath[i - 1].y,\r\n x3 - xPath[i - 1].x,\r\n y3 - xPath[i - 1].y\r\n ];\r\n moves[moves.length - 1].deltas.push(delta);\r\n break;\r\n\r\n case \"arc\":\r\n moves.push({\r\n deltas: [],\r\n abs: [],\r\n arc: true\r\n });\r\n\r\n if (Array.isArray(moves[moves.length - 1].abs)) {\r\n moves[moves.length - 1].abs.push(pt);\r\n }\r\n break;\r\n }\r\n }\r\n var style;\r\n if (!isClip) {\r\n if (rule === \"stroke\") {\r\n style = \"stroke\";\r\n } else {\r\n style = \"fill\";\r\n }\r\n } else {\r\n style = null;\r\n }\r\n\r\n var began = false;\r\n for (var k = 0; k < moves.length; k++) {\r\n if (moves[k].arc) {\r\n var arcs = moves[k].abs;\r\n\r\n for (var ii = 0; ii < arcs.length; ii++) {\r\n var arc = arcs[ii];\r\n\r\n if (arc.type === \"arc\") {\r\n drawArc.call(\r\n this,\r\n arc.x,\r\n arc.y,\r\n arc.radius,\r\n arc.startAngle,\r\n arc.endAngle,\r\n arc.counterclockwise,\r\n undefined,\r\n isClip,\r\n !began\r\n );\r\n } else {\r\n drawLine.call(this, arc.x, arc.y);\r\n }\r\n began = true;\r\n }\r\n } else if (moves[k].close === true) {\r\n this.pdf.internal.out(\"h\");\r\n began = false;\r\n } else if (moves[k].begin !== true) {\r\n var x = moves[k].start.x;\r\n var y = moves[k].start.y;\r\n drawLines.call(this, moves[k].deltas, x, y);\r\n began = true;\r\n }\r\n }\r\n\r\n if (style) {\r\n putStyle.call(this, style);\r\n }\r\n if (isClip) {\r\n doClip.call(this);\r\n }\r\n };\r\n\r\n var getBaseline = function(y) {\r\n var height =\r\n this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n switch (this.ctx.textBaseline) {\r\n case \"bottom\":\r\n return y - descent;\r\n case \"top\":\r\n return y + height - descent;\r\n case \"hanging\":\r\n return y + height - 2 * descent;\r\n case \"middle\":\r\n return y + height / 2 - descent;\r\n case \"ideographic\":\r\n // TODO not implemented\r\n return y;\r\n case \"alphabetic\":\r\n default:\r\n return y;\r\n }\r\n };\r\n\r\n var getTextBottom = function(yBaseLine) {\r\n var height =\r\n this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n return yBaseLine + descent;\r\n };\r\n\r\n Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n var canvasGradient = function canvasGradient() {};\r\n\r\n canvasGradient.colorStops = [];\r\n canvasGradient.addColorStop = function(offset, color) {\r\n this.colorStops.push([offset, color]);\r\n };\r\n\r\n canvasGradient.getColor = function() {\r\n if (this.colorStops.length === 0) {\r\n return \"#000000\";\r\n }\r\n\r\n return this.colorStops[0][1];\r\n };\r\n\r\n canvasGradient.isCanvasGradient = true;\r\n return canvasGradient;\r\n };\r\n Context2D.prototype.createPattern = function createPattern() {\r\n return this.createLinearGradient();\r\n };\r\n Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n return this.createLinearGradient();\r\n };\r\n\r\n /**\r\n *\r\n * @param x Edge point X\r\n * @param y Edge point Y\r\n * @param r Radius\r\n * @param a1 start angle\r\n * @param a2 end angle\r\n * @param counterclockwise\r\n * @param style\r\n * @param isClip\r\n */\r\n var drawArc = function(\r\n x,\r\n y,\r\n r,\r\n a1,\r\n a2,\r\n counterclockwise,\r\n style,\r\n isClip,\r\n includeMove\r\n ) {\r\n // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n for (var i = 0; i < curves.length; i++) {\r\n var curve = curves[i];\r\n if (i === 0) {\r\n if (includeMove) {\r\n doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n } else {\r\n drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n }\r\n }\r\n drawCurve.call(\r\n this,\r\n x,\r\n y,\r\n curve.x2,\r\n curve.y2,\r\n curve.x3,\r\n curve.y3,\r\n curve.x4,\r\n curve.y4\r\n );\r\n }\r\n\r\n if (!isClip) {\r\n putStyle.call(this, style);\r\n } else {\r\n doClip.call(this);\r\n }\r\n };\r\n\r\n var putStyle = function(style) {\r\n switch (style) {\r\n case \"stroke\":\r\n this.pdf.internal.out(\"S\");\r\n break;\r\n case \"fill\":\r\n this.pdf.internal.out(\"f\");\r\n break;\r\n }\r\n };\r\n\r\n var doClip = function() {\r\n this.pdf.clip();\r\n this.pdf.discardPath();\r\n };\r\n\r\n var doMove = function(x, y) {\r\n this.pdf.internal.out(\r\n getHorizontalCoordinateString(x) +\r\n \" \" +\r\n getVerticalCoordinateString(y) +\r\n \" m\"\r\n );\r\n };\r\n\r\n var putText = function(options) {\r\n var textAlign;\r\n switch (options.align) {\r\n case \"right\":\r\n case \"end\":\r\n textAlign = \"right\";\r\n break;\r\n case \"center\":\r\n textAlign = \"center\";\r\n break;\r\n case \"left\":\r\n case \"start\":\r\n default:\r\n textAlign = \"left\";\r\n break;\r\n }\r\n\r\n var textDimensions = this.pdf.getTextDimensions(options.text);\r\n var yBaseLine = getBaseline.call(this, options.y);\r\n var yBottom = getTextBottom.call(this, yBaseLine);\r\n var yTop = yBottom - textDimensions.h;\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n var matrix = new Matrix();\r\n matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n var baselineRect = this.ctx.transform.applyToRectangle(\r\n new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n );\r\n var textBounds = matrix.applyToRectangle(\r\n new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n );\r\n var pageArray = getPagesByPath.call(this, textBounds);\r\n var pages = [];\r\n for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n if (pages.indexOf(pageArray[ii]) === -1) {\r\n pages.push(pageArray[ii]);\r\n }\r\n }\r\n\r\n sortPages(pages);\r\n\r\n var clipPath, oldSize, oldLineWidth;\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var i = min; i < max + 1; i++) {\r\n this.pdf.setPage(i);\r\n\r\n var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusBottomMargin =\r\n this.pdf.internal.pageSize.height - this.margin[2];\r\n var pageHeightMinusMargins =\r\n pageHeightMinusBottomMargin - this.margin[0];\r\n var pageWidthMinusRightMargin =\r\n this.pdf.internal.pageSize.width - this.margin[1];\r\n var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n var previousPageHeightSum =\r\n i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -1 * previousPageHeightSum + topMargin\r\n );\r\n drawPaths.call(this, \"fill\", true);\r\n this.path = tmpPaths;\r\n }\r\n var textBoundsOnPage = pathPositionRedo(\r\n [JSON.parse(JSON.stringify(textBounds))],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n if (options.scale >= 0.01) {\r\n oldSize = this.pdf.internal.getFontSize();\r\n this.pdf.setFontSize(oldSize * options.scale);\r\n oldLineWidth = this.lineWidth;\r\n this.lineWidth = oldLineWidth * options.scale;\r\n }\r\n\r\n var doSlice = this.autoPaging !== \"text\";\r\n\r\n if (\r\n doSlice ||\r\n textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n ) {\r\n if (\r\n doSlice ||\r\n (textBoundsOnPage.y >= topMargin &&\r\n textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n ) {\r\n var croppedText = doSlice\r\n ? options.text\r\n : this.pdf.splitTextToSize(\r\n options.text,\r\n options.maxWidth ||\r\n pageWidthMinusRightMargin - textBoundsOnPage.x\r\n )[0];\r\n var baseLineRectOnPage = pathPositionRedo(\r\n [JSON.parse(JSON.stringify(baselineRect))],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum +\r\n topMargin +\r\n this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n const needsClipping =\r\n doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n\r\n this.pdf.text(\r\n croppedText,\r\n baseLineRectOnPage.x,\r\n baseLineRectOnPage.y,\r\n {\r\n angle: options.angle,\r\n align: textAlign,\r\n renderingMode: options.renderingMode\r\n }\r\n );\r\n\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n } else {\r\n // This text is the last element of the page, but it got cut off due to the margin\r\n // so we render it in the next page\r\n\r\n if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n // As a result, all other elements have their y offset increased\r\n this.ctx.prevPageLastElemOffset +=\r\n pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n }\r\n }\r\n\r\n if (options.scale >= 0.01) {\r\n this.pdf.setFontSize(oldSize);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n }\r\n } else {\r\n if (options.scale >= 0.01) {\r\n oldSize = this.pdf.internal.getFontSize();\r\n this.pdf.setFontSize(oldSize * options.scale);\r\n oldLineWidth = this.lineWidth;\r\n this.lineWidth = oldLineWidth * options.scale;\r\n }\r\n this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n angle: options.angle,\r\n align: textAlign,\r\n renderingMode: options.renderingMode,\r\n maxWidth: options.maxWidth\r\n });\r\n\r\n if (options.scale >= 0.01) {\r\n this.pdf.setFontSize(oldSize);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n }\r\n };\r\n\r\n var drawLine = function(x, y, prevX, prevY) {\r\n prevX = prevX || 0;\r\n prevY = prevY || 0;\r\n\r\n this.pdf.internal.out(\r\n getHorizontalCoordinateString(x + prevX) +\r\n \" \" +\r\n getVerticalCoordinateString(y + prevY) +\r\n \" l\"\r\n );\r\n };\r\n\r\n var drawLines = function(lines, x, y) {\r\n return this.pdf.lines(lines, x, y, null, null);\r\n };\r\n\r\n var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n this.pdf.internal.out(\r\n [\r\n f2(getHorizontalCoordinate(x1 + x)),\r\n f2(getVerticalCoordinate(y1 + y)),\r\n f2(getHorizontalCoordinate(x2 + x)),\r\n f2(getVerticalCoordinate(y2 + y)),\r\n f2(getHorizontalCoordinate(x3 + x)),\r\n f2(getVerticalCoordinate(y3 + y)),\r\n \"c\"\r\n ].join(\" \")\r\n );\r\n };\r\n\r\n /**\r\n * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n *\r\n * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n * @function createArc\r\n */\r\n var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n var twoPi = Math.PI * 2;\r\n var halfPi = Math.PI / 2.0;\r\n\r\n while (startAngle > endAngle) {\r\n startAngle = startAngle - twoPi;\r\n }\r\n var totalAngle = Math.abs(endAngle - startAngle);\r\n if (totalAngle < twoPi) {\r\n if (anticlockwise) {\r\n totalAngle = twoPi - totalAngle;\r\n }\r\n }\r\n\r\n // Compute the sequence of arc curves, up to PI/2 at a time.\r\n var curves = [];\r\n\r\n // clockwise or counterclockwise\r\n var sgn = anticlockwise ? -1 : +1;\r\n\r\n var a1 = startAngle;\r\n for (; totalAngle > EPSILON; ) {\r\n var remain = sgn * Math.min(totalAngle, halfPi);\r\n var a2 = a1 + remain;\r\n curves.push(createSmallArc.call(this, radius, a1, a2));\r\n totalAngle -= Math.abs(a2 - a1);\r\n a1 = a2;\r\n }\r\n\r\n return curves;\r\n };\r\n\r\n /**\r\n * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n *\r\n * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n *\r\n * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n */\r\n var createSmallArc = function(r, a1, a2) {\r\n var a = (a2 - a1) / 2.0;\r\n\r\n var x4 = r * Math.cos(a);\r\n var y4 = r * Math.sin(a);\r\n var x1 = x4;\r\n var y1 = -y4;\r\n\r\n var q1 = x1 * x1 + y1 * y1;\r\n var q2 = q1 + x1 * x4 + y1 * y4;\r\n var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n var x2 = x1 - k2 * y1;\r\n var y2 = y1 + k2 * x1;\r\n var x3 = x2;\r\n var y3 = -y2;\r\n\r\n var ar = a + a1;\r\n var cos_ar = Math.cos(ar);\r\n var sin_ar = Math.sin(ar);\r\n\r\n return {\r\n x1: r * Math.cos(a1),\r\n y1: r * Math.sin(a1),\r\n x2: x2 * cos_ar - y2 * sin_ar,\r\n y2: x2 * sin_ar + y2 * cos_ar,\r\n x3: x3 * cos_ar - y3 * sin_ar,\r\n y3: x3 * sin_ar + y3 * cos_ar,\r\n x4: r * Math.cos(a2),\r\n y4: r * Math.sin(a2)\r\n };\r\n };\r\n\r\n var rad2deg = function(value) {\r\n return (value * 180) / Math.PI;\r\n };\r\n\r\n var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n var midX1 = sx + (cpx - sx) * 0.5;\r\n var midY1 = sy + (cpy - sy) * 0.5;\r\n var midX2 = ex + (cpx - ex) * 0.5;\r\n var midY2 = ey + (cpy - ey) * 0.5;\r\n var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n return new Rectangle(\r\n resultX1,\r\n resultY1,\r\n resultX2 - resultX1,\r\n resultY2 - resultY1\r\n );\r\n };\r\n\r\n //De Casteljau algorithm\r\n var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n var tobx = bx - ax;\r\n var toby = by - ay;\r\n var tocx = cx - bx;\r\n var tocy = cy - by;\r\n var todx = dx - cx;\r\n var tody = dy - cy;\r\n var precision = 40;\r\n var d,\r\n i,\r\n px,\r\n py,\r\n qx,\r\n qy,\r\n rx,\r\n ry,\r\n tx,\r\n ty,\r\n sx,\r\n sy,\r\n x,\r\n y,\r\n minx,\r\n miny,\r\n maxx,\r\n maxy,\r\n toqx,\r\n toqy,\r\n torx,\r\n tory,\r\n totx,\r\n toty;\r\n for (i = 0; i < precision + 1; i++) {\r\n d = i / precision;\r\n px = ax + d * tobx;\r\n py = ay + d * toby;\r\n qx = bx + d * tocx;\r\n qy = by + d * tocy;\r\n rx = cx + d * todx;\r\n ry = cy + d * tody;\r\n toqx = qx - px;\r\n toqy = qy - py;\r\n torx = rx - qx;\r\n tory = ry - qy;\r\n\r\n sx = px + d * toqx;\r\n sy = py + d * toqy;\r\n tx = qx + d * torx;\r\n ty = qy + d * tory;\r\n totx = tx - sx;\r\n toty = ty - sy;\r\n\r\n x = sx + d * totx;\r\n y = sy + d * toty;\r\n if (i == 0) {\r\n minx = x;\r\n miny = y;\r\n maxx = x;\r\n maxy = y;\r\n } else {\r\n minx = Math.min(minx, x);\r\n miny = Math.min(miny, y);\r\n maxx = Math.max(maxx, x);\r\n maxy = Math.max(maxy, y);\r\n }\r\n }\r\n return new Rectangle(\r\n Math.round(minx),\r\n Math.round(miny),\r\n Math.round(maxx - minx),\r\n Math.round(maxy - miny)\r\n );\r\n };\r\n\r\n var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n return JSON.stringify({\r\n lineDash: lineDash,\r\n lineDashOffset: lineDashOffset\r\n });\r\n };\r\n\r\n var setLineDash = function() {\r\n // Avoid unnecessary line dash declarations.\r\n if (\r\n !this.prevLineDash &&\r\n !this.ctx.lineDash.length &&\r\n !this.ctx.lineDashOffset\r\n ) {\r\n return;\r\n }\r\n\r\n // Avoid unnecessary line dash declarations.\r\n const nextLineDash = getPrevLineDashValue(\r\n this.ctx.lineDash,\r\n this.ctx.lineDashOffset\r\n );\r\n if (this.prevLineDash !== nextLineDash) {\r\n this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n this.prevLineDash = nextLineDash;\r\n }\r\n };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var ASCII85Encode = function(a) {\n var b, c, d, e, f, g, h, i, j, k;\n // eslint-disable-next-line no-control-regex\n for (\n !/[^\\x00-\\xFF]/.test(a),\n b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n a += b,\n c = [],\n d = 0,\n e = a.length;\n e > d;\n d += 4\n )\n (f =\n (a.charCodeAt(d) << 24) +\n (a.charCodeAt(d + 1) << 16) +\n (a.charCodeAt(d + 2) << 8) +\n a.charCodeAt(d + 3)),\n 0 !== f\n ? ((k = f % 85),\n (f = (f - k) / 85),\n (j = f % 85),\n (f = (f - j) / 85),\n (i = f % 85),\n (f = (f - i) / 85),\n (h = f % 85),\n (f = (f - h) / 85),\n (g = f % 85),\n c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n : c.push(122);\n return (\n (function(a, b) {\n for (var c = b; c > 0; c--) a.pop();\n })(c, b.length),\n String.fromCharCode.apply(String, c) + \"~>\"\n );\n };\n\n var ASCII85Decode = function(a) {\n var c,\n d,\n e,\n f,\n g,\n h = String,\n l = \"length\",\n w = 255,\n x = \"charCodeAt\",\n y = \"slice\",\n z = \"replace\";\n for (\n \"~>\" === a[y](-2),\n a = a[y](0, -2)\n [z](/\\s/g, \"\")\n [z](\"z\", \"!!!!!\"),\n c = \"uuuuu\"[y](a[l] % 5 || 5),\n a += c,\n e = [],\n f = 0,\n g = a[l];\n g > f;\n f += 5\n )\n (d =\n 52200625 * (a[x](f) - 33) +\n 614125 * (a[x](f + 1) - 33) +\n 7225 * (a[x](f + 2) - 33) +\n 85 * (a[x](f + 3) - 33) +\n (a[x](f + 4) - 33)),\n e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n return (\n (function(a, b) {\n for (var c = b; c > 0; c--) a.pop();\n })(e, c[l]),\n h.fromCharCode.apply(h, e)\n );\n };\n\n var ASCIIHexEncode = function(value) {\n return (\n value\n .split(\"\")\n .map(function(value) {\n return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n })\n .join(\"\") + \">\"\n );\n };\n\n var ASCIIHexDecode = function(value) {\n var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n value = value.replace(/\\s/g, \"\");\n if (value.indexOf(\">\") !== -1) {\n value = value.substr(0, value.indexOf(\">\"));\n }\n if (value.length % 2) {\n value += \"0\";\n }\n if (regexCheckIfHex.test(value) === false) {\n return \"\";\n }\n var result = \"\";\n for (var i = 0; i < value.length; i += 2) {\n result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n }\n return result;\n };\n /*\n var FlatePredictors = {\n None: 1,\n TIFF: 2,\n PNG_None: 10,\n PNG_Sub: 11,\n PNG_Up: 12,\n PNG_Average: 13,\n PNG_Paeth: 14,\n PNG_Optimum: 15\n };\n */\n\n var FlateEncode = function(data) {\n var arr = new Uint8Array(data.length);\n var i = data.length;\n while (i--) {\n arr[i] = data.charCodeAt(i);\n }\n arr = zlibSync(arr);\n data = arr.reduce(function(data, byte) {\n return data + String.fromCharCode(byte);\n }, \"\");\n return data;\n };\n\n jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n \"use strict\";\n var i = 0;\n var data = origData || \"\";\n var reverseChain = [];\n filterChain = filterChain || [];\n\n if (typeof filterChain === \"string\") {\n filterChain = [filterChain];\n }\n\n for (i = 0; i < filterChain.length; i += 1) {\n switch (filterChain[i]) {\n case \"ASCII85Decode\":\n case \"/ASCII85Decode\":\n data = ASCII85Decode(data);\n reverseChain.push(\"/ASCII85Encode\");\n break;\n case \"ASCII85Encode\":\n case \"/ASCII85Encode\":\n data = ASCII85Encode(data);\n reverseChain.push(\"/ASCII85Decode\");\n break;\n case \"ASCIIHexDecode\":\n case \"/ASCIIHexDecode\":\n data = ASCIIHexDecode(data);\n reverseChain.push(\"/ASCIIHexEncode\");\n break;\n case \"ASCIIHexEncode\":\n case \"/ASCIIHexEncode\":\n data = ASCIIHexEncode(data);\n reverseChain.push(\"/ASCIIHexDecode\");\n break;\n case \"FlateEncode\":\n case \"/FlateEncode\":\n data = FlateEncode(data);\n reverseChain.push(\"/FlateDecode\");\n break;\n default:\n throw new Error(\n 'The filter: \"' + filterChain[i] + '\" is not implemented'\n );\n }\n }\n\n return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @name loadFile\n * @function\n * @param {string} url\n * @param {boolean} sync\n * @param {function} callback\n * @returns {string|undefined} result\n */\n jsPDFAPI.loadFile = function(url, sync, callback) {\n return browserRequest(url, sync, callback);\n\n };\n\n /**\n * @name loadImageFile\n * @function\n * @param {string} path\n * @param {boolean} sync\n * @param {function} callback\n */\n jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n function browserRequest(url, sync, callback) {\n sync = sync === false ? false : true;\n callback = typeof callback === \"function\" ? callback : function() {};\n var result = undefined;\n\n var xhr = function(url, sync, callback) {\n var request = new XMLHttpRequest();\n var i = 0;\n\n var sanitizeUnicode = function(data) {\n var dataLength = data.length;\n var charArray = [];\n var StringFromCharCode = String.fromCharCode;\n\n //Transform Unicode to ASCII\n for (i = 0; i < dataLength; i += 1) {\n charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n }\n return charArray.join(\"\");\n };\n\n request.open(\"GET\", url, !sync);\n // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n if (sync === false) {\n request.onload = function() {\n if (request.status === 200) {\n callback(sanitizeUnicode(this.responseText));\n } else {\n callback(undefined);\n }\n };\n }\n request.send(null);\n\n if (sync && request.status === 200) {\n return sanitizeUnicode(request.responseText);\n }\n };\n try {\n result = xhr(url, sync, callback);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n return result;\n }\n\n function nodeReadFile(url, sync, callback) {\n sync = sync === false ? false : true;\n var result = undefined;\n\n var fs = require(\"fs\");\n var path = require(\"path\");\n\n url = path.resolve(url);\n if (sync) {\n try {\n result = fs.readFileSync(url, { encoding: \"latin1\" });\n } catch (e) {\n return undefined;\n }\n } else {\n fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n if (!callback) {\n return;\n }\n if (err) {\n callback(undefined);\n }\n callback(data);\n });\n }\n\n return result;\n }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n function loadHtml2Canvas() {\n return (function() {\n if (globalObject[\"html2canvas\"]) {\n return Promise.resolve(globalObject[\"html2canvas\"]);\n }\n\n return import(\"html2canvas\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n })\n .then(function(html2canvas) {\n return html2canvas.default ? html2canvas.default : html2canvas;\n });\n }\n\n function loadDomPurify() {\n return (function() {\n if (globalObject[\"DOMPurify\"]) {\n return Promise.resolve(globalObject[\"DOMPurify\"]);\n }\n\n return import(\"dompurify\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n })\n .then(function(dompurify) {\n return dompurify.default ? dompurify.default : dompurify;\n });\n }\n\n /**\n * Determine the type of a variable/object.\n *\n * @private\n * @ignore\n */\n var objType = function(obj) {\n var type = typeof obj;\n if (type === \"undefined\") return \"undefined\";\n else if (type === \"string\" || obj instanceof String) return \"string\";\n else if (type === \"number\" || obj instanceof Number) return \"number\";\n else if (type === \"function\" || obj instanceof Function) return \"function\";\n else if (!!obj && obj.constructor === Array) return \"array\";\n else if (obj && obj.nodeType === 1) return \"element\";\n else if (type === \"object\") return \"object\";\n else return \"unknown\";\n };\n\n /**\n * Create an HTML element with optional className, innerHTML, and style.\n *\n * @private\n * @ignore\n */\n var createElement = function(tagName, opt) {\n var el = document.createElement(tagName);\n if (opt.className) el.className = opt.className;\n if (opt.innerHTML && opt.dompurify) {\n el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n }\n for (var key in opt.style) {\n el.style[key] = opt.style[key];\n }\n return el;\n };\n\n /**\n * Deep-clone a node and preserve contents/properties.\n *\n * @private\n * @ignore\n */\n var cloneNode = function(node, javascriptEnabled) {\n // Recursively clone the node.\n var clone =\n node.nodeType === 3\n ? document.createTextNode(node.nodeValue)\n : node.cloneNode(false);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (\n javascriptEnabled === true ||\n child.nodeType !== 1 ||\n child.nodeName !== \"SCRIPT\"\n ) {\n clone.appendChild(cloneNode(child, javascriptEnabled));\n }\n }\n\n if (node.nodeType === 1) {\n // Preserve contents/properties of special nodes.\n if (node.nodeName === \"CANVAS\") {\n clone.width = node.width;\n clone.height = node.height;\n clone.getContext(\"2d\").drawImage(node, 0, 0);\n } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n clone.value = node.value;\n }\n\n // Preserve the node's scroll position when it loads.\n clone.addEventListener(\n \"load\",\n function() {\n clone.scrollTop = node.scrollTop;\n clone.scrollLeft = node.scrollLeft;\n },\n true\n );\n }\n\n // Return the cloned node.\n return clone;\n };\n\n /* ----- CONSTRUCTOR ----- */\n\n var Worker = function Worker(opt) {\n // Create the root parent for the proto chain, and the starting Worker.\n var root = Object.assign(\n Worker.convert(Promise.resolve()),\n JSON.parse(JSON.stringify(Worker.template))\n );\n var self = Worker.convert(Promise.resolve(), root);\n\n // Set progress, optional settings, and return.\n self = self.setProgress(1, Worker, 1, [Worker]);\n self = self.set(opt);\n return self;\n };\n\n // Boilerplate for subclassing Promise.\n Worker.prototype = Object.create(Promise.prototype);\n Worker.prototype.constructor = Worker;\n\n // Converts/casts promises into Workers.\n Worker.convert = function convert(promise, inherit) {\n // Uses prototypal inheritance to receive changes made to ancestors' properties.\n promise.__proto__ = inherit || Worker.prototype;\n return promise;\n };\n\n Worker.template = {\n prop: {\n src: null,\n container: null,\n overlay: null,\n canvas: null,\n img: null,\n pdf: null,\n pageSize: null,\n callback: function() {}\n },\n progress: {\n val: 0,\n state: null,\n n: 0,\n stack: []\n },\n opt: {\n filename: \"file.pdf\",\n margin: [0, 0, 0, 0],\n enableLinks: true,\n x: 0,\n y: 0,\n html2canvas: {},\n jsPDF: {},\n backgroundColor: \"transparent\"\n }\n };\n\n /* ----- FROM / TO ----- */\n\n Worker.prototype.from = function from(src, type) {\n function getType(src) {\n switch (objType(src)) {\n case \"string\":\n return \"string\";\n case \"element\":\n return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n default:\n return \"unknown\";\n }\n }\n\n return this.then(function from_main() {\n type = type || getType(src);\n switch (type) {\n case \"string\":\n return this.then(loadDomPurify).then(function(dompurify) {\n return this.set({\n src: createElement(\"div\", {\n innerHTML: src,\n dompurify: dompurify\n })\n });\n });\n case \"element\":\n return this.set({ src: src });\n case \"canvas\":\n return this.set({ canvas: src });\n case \"img\":\n return this.set({ img: src });\n default:\n return this.error(\"Unknown source type.\");\n }\n });\n };\n\n Worker.prototype.to = function to(target) {\n // Route the 'to' request to the appropriate method.\n switch (target) {\n case \"container\":\n return this.toContainer();\n case \"canvas\":\n return this.toCanvas();\n case \"img\":\n return this.toImg();\n case \"pdf\":\n return this.toPdf();\n default:\n return this.error(\"Invalid target.\");\n }\n };\n\n Worker.prototype.toContainer = function toContainer() {\n // Set up function prerequisites.\n var prereqs = [\n function checkSrc() {\n return (\n this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n );\n },\n function checkPageSize() {\n return this.prop.pageSize || this.setPageSize();\n }\n ];\n return this.thenList(prereqs).then(function toContainer_main() {\n // Define the CSS styles for the container and its overlay parent.\n var overlayCSS = {\n position: \"fixed\",\n overflow: \"hidden\",\n zIndex: 1000,\n left: \"-100000px\",\n right: 0,\n bottom: 0,\n top: 0\n };\n var containerCSS = {\n position: \"relative\",\n display: \"inline-block\",\n width:\n (typeof this.opt.width === \"number\" &&\n !isNaN(this.opt.width) &&\n typeof this.opt.windowWidth === \"number\" &&\n !isNaN(this.opt.windowWidth)\n ? this.opt.windowWidth\n : Math.max(\n this.prop.src.clientWidth,\n this.prop.src.scrollWidth,\n this.prop.src.offsetWidth\n )) + \"px\",\n left: 0,\n right: 0,\n top: 0,\n margin: \"auto\",\n backgroundColor: this.opt.backgroundColor\n }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n var source = cloneNode(\n this.prop.src,\n this.opt.html2canvas.javascriptEnabled\n );\n\n if (source.tagName === \"BODY\") {\n containerCSS.height =\n Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.clientHeight,\n document.documentElement.scrollHeight,\n document.documentElement.offsetHeight\n ) + \"px\";\n }\n\n this.prop.overlay = createElement(\"div\", {\n className: \"html2pdf__overlay\",\n style: overlayCSS\n });\n this.prop.container = createElement(\"div\", {\n className: \"html2pdf__container\",\n style: containerCSS\n });\n this.prop.container.appendChild(source);\n this.prop.container.firstChild.appendChild(\n createElement(\"div\", {\n style: {\n clear: \"both\",\n border: \"0 none transparent\",\n margin: 0,\n padding: 0,\n height: 0\n }\n })\n );\n this.prop.container.style.float = \"none\";\n this.prop.overlay.appendChild(this.prop.container);\n document.body.appendChild(this.prop.overlay);\n this.prop.container.firstChild.style.position = \"relative\";\n this.prop.container.height =\n Math.max(\n this.prop.container.firstChild.clientHeight,\n this.prop.container.firstChild.scrollHeight,\n this.prop.container.firstChild.offsetHeight\n ) + \"px\";\n });\n };\n\n Worker.prototype.toCanvas = function toCanvas() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContainer() {\n return (\n document.body.contains(this.prop.container) || this.toContainer()\n );\n }\n ];\n\n // Fulfill prereqs then create the canvas.\n return this.thenList(prereqs)\n .then(loadHtml2Canvas)\n .then(function toCanvas_main(html2canvas) {\n // Handle old-fashioned 'onrendered' argument.\n var options = Object.assign({}, this.opt.html2canvas);\n delete options.onrendered;\n\n return html2canvas(this.prop.container, options);\n })\n .then(function toCanvas_post(canvas) {\n // Handle old-fashioned 'onrendered' argument.\n var onRendered = this.opt.html2canvas.onrendered || function() {};\n onRendered(canvas);\n\n this.prop.canvas = canvas;\n document.body.removeChild(this.prop.overlay);\n });\n };\n\n Worker.prototype.toContext2d = function toContext2d() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContainer() {\n return (\n document.body.contains(this.prop.container) || this.toContainer()\n );\n }\n ];\n\n // Fulfill prereqs then create the canvas.\n return this.thenList(prereqs)\n .then(loadHtml2Canvas)\n .then(function toContext2d_main(html2canvas) {\n // Handle old-fashioned 'onrendered' argument.\n\n var pdf = this.opt.jsPDF;\n var fontFaces = this.opt.fontFaces;\n\n var scale =\n typeof this.opt.width === \"number\" &&\n !isNaN(this.opt.width) &&\n typeof this.opt.windowWidth === \"number\" &&\n !isNaN(this.opt.windowWidth)\n ? this.opt.width / this.opt.windowWidth\n : 1;\n\n var options = Object.assign(\n {\n async: true,\n allowTaint: true,\n scale: scale,\n scrollX: this.opt.scrollX || 0,\n scrollY: this.opt.scrollY || 0,\n backgroundColor: \"#ffffff\",\n imageTimeout: 15000,\n logging: true,\n proxy: null,\n removeContainer: true,\n foreignObjectRendering: false,\n useCORS: false\n },\n this.opt.html2canvas\n );\n delete options.onrendered;\n\n pdf.context2d.autoPaging =\n typeof this.opt.autoPaging === \"undefined\"\n ? true\n : this.opt.autoPaging;\n pdf.context2d.posX = this.opt.x;\n pdf.context2d.posY = this.opt.y;\n pdf.context2d.margin = this.opt.margin;\n pdf.context2d.fontFaces = fontFaces;\n\n if (fontFaces) {\n for (var i = 0; i < fontFaces.length; ++i) {\n var font = fontFaces[i];\n var src = font.src.find(function(src) {\n return src.format === \"truetype\";\n });\n\n if (src) {\n pdf.addFont(src.url, font.ref.name, font.ref.style);\n }\n }\n }\n\n options.windowHeight = options.windowHeight || 0;\n options.windowHeight =\n options.windowHeight == 0\n ? Math.max(\n this.prop.container.clientHeight,\n this.prop.container.scrollHeight,\n this.prop.container.offsetHeight\n )\n : options.windowHeight;\n\n pdf.context2d.save(true);\n return html2canvas(this.prop.container, options);\n })\n .then(function toContext2d_post(canvas) {\n this.opt.jsPDF.context2d.restore(true);\n\n // Handle old-fashioned 'onrendered' argument.\n var onRendered = this.opt.html2canvas.onrendered || function() {};\n onRendered(canvas);\n\n this.prop.canvas = canvas;\n document.body.removeChild(this.prop.overlay);\n });\n };\n\n Worker.prototype.toImg = function toImg() {\n // Set up function prerequisites.\n var prereqs = [\n function checkCanvas() {\n return this.prop.canvas || this.toCanvas();\n }\n ];\n\n // Fulfill prereqs then create the image.\n return this.thenList(prereqs).then(function toImg_main() {\n var imgData = this.prop.canvas.toDataURL(\n \"image/\" + this.opt.image.type,\n this.opt.image.quality\n );\n this.prop.img = document.createElement(\"img\");\n this.prop.img.src = imgData;\n });\n };\n\n Worker.prototype.toPdf = function toPdf() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContext2d() {\n return this.toContext2d();\n }\n //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n ];\n\n // Fulfill prereqs then create the image.\n return this.thenList(prereqs).then(function toPdf_main() {\n // Create local copies of frequently used properties.\n this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n });\n };\n\n /* ----- OUTPUT / SAVE ----- */\n\n Worker.prototype.output = function output(type, options, src) {\n // Redirect requests to the correct function (outputPdf / outputImg).\n src = src || \"pdf\";\n if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n return this.outputImg(type, options);\n } else {\n return this.outputPdf(type, options);\n }\n };\n\n Worker.prototype.outputPdf = function outputPdf(type, options) {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs then perform the appropriate output.\n return this.thenList(prereqs).then(function outputPdf_main() {\n /* Currently implemented output types:\n * https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n * save(options), arraybuffer, blob, bloburi/bloburl,\n * datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n */\n return this.prop.pdf.output(type, options);\n });\n };\n\n Worker.prototype.outputImg = function outputImg(type) {\n // Set up function prerequisites.\n var prereqs = [\n function checkImg() {\n return this.prop.img || this.toImg();\n }\n ];\n\n // Fulfill prereqs then perform the appropriate output.\n return this.thenList(prereqs).then(function outputImg_main() {\n switch (type) {\n case undefined:\n case \"img\":\n return this.prop.img;\n case \"datauristring\":\n case \"dataurlstring\":\n return this.prop.img.src;\n case \"datauri\":\n case \"dataurl\":\n return (document.location.href = this.prop.img.src);\n default:\n throw 'Image output type \"' + type + '\" is not supported.';\n }\n });\n };\n\n Worker.prototype.save = function save(filename) {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs, update the filename (if provided), and save the PDF.\n return this.thenList(prereqs)\n .set(filename ? { filename: filename } : null)\n .then(function save_main() {\n this.prop.pdf.save(this.opt.filename);\n });\n };\n\n Worker.prototype.doCallback = function doCallback() {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs, update the filename (if provided), and save the PDF.\n return this.thenList(prereqs).then(function doCallback_main() {\n this.prop.callback(this.prop.pdf);\n });\n };\n\n /* ----- SET / GET ----- */\n\n Worker.prototype.set = function set(opt) {\n // TODO: Implement ordered pairs?\n\n // Silently ignore invalid or empty input.\n if (objType(opt) !== \"object\") {\n return this;\n }\n\n // Build an array of setter functions to queue.\n var fns = Object.keys(opt || {}).map(function(key) {\n if (key in Worker.template.prop) {\n // Set pre-defined properties.\n return function set_prop() {\n this.prop[key] = opt[key];\n };\n } else {\n switch (key) {\n case \"margin\":\n return this.setMargin.bind(this, opt.margin);\n case \"jsPDF\":\n return function set_jsPDF() {\n this.opt.jsPDF = opt.jsPDF;\n return this.setPageSize();\n };\n case \"pageSize\":\n return this.setPageSize.bind(this, opt.pageSize);\n default:\n // Set any other properties in opt.\n return function set_opt() {\n this.opt[key] = opt[key];\n };\n }\n }\n }, this);\n\n // Set properties within the promise chain.\n return this.then(function set_main() {\n return this.thenList(fns);\n });\n };\n\n Worker.prototype.get = function get(key, cbk) {\n return this.then(function get_main() {\n // Fetch the requested property, either as a predefined prop or in opt.\n var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n return cbk ? cbk(val) : val;\n });\n };\n\n Worker.prototype.setMargin = function setMargin(margin) {\n return this.then(function setMargin_main() {\n // Parse the margin property.\n switch (objType(margin)) {\n case \"number\":\n margin = [margin, margin, margin, margin];\n // eslint-disable-next-line no-fallthrough\n case \"array\":\n if (margin.length === 2) {\n margin = [margin[0], margin[1], margin[0], margin[1]];\n }\n if (margin.length === 4) {\n break;\n }\n // eslint-disable-next-line no-fallthrough\n default:\n return this.error(\"Invalid margin array.\");\n }\n\n // Set the margin property, then update pageSize.\n this.opt.margin = margin;\n }).then(this.setPageSize);\n };\n\n Worker.prototype.setPageSize = function setPageSize(pageSize) {\n function toPx(val, k) {\n return Math.floor(((val * k) / 72) * 96);\n }\n\n return this.then(function setPageSize_main() {\n // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n // Add 'inner' field if not present.\n if (!pageSize.hasOwnProperty(\"inner\")) {\n pageSize.inner = {\n width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n };\n pageSize.inner.px = {\n width: toPx(pageSize.inner.width, pageSize.k),\n height: toPx(pageSize.inner.height, pageSize.k)\n };\n pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n }\n\n // Attach pageSize to this.\n this.prop.pageSize = pageSize;\n });\n };\n\n Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n // Immediately update all progress values.\n if (val != null) this.progress.val = val;\n if (state != null) this.progress.state = state;\n if (n != null) this.progress.n = n;\n if (stack != null) this.progress.stack = stack;\n this.progress.ratio = this.progress.val / this.progress.state;\n\n // Return this for command chaining.\n return this;\n };\n\n Worker.prototype.updateProgress = function updateProgress(\n val,\n state,\n n,\n stack\n ) {\n // Immediately update all progress values, using setProgress.\n return this.setProgress(\n val ? this.progress.val + val : null,\n state ? state : null,\n n ? this.progress.n + n : null,\n stack ? this.progress.stack.concat(stack) : null\n );\n };\n\n /* ----- PROMISE MAPPING ----- */\n\n Worker.prototype.then = function then(onFulfilled, onRejected) {\n // Wrap `this` for encapsulation.\n var self = this;\n\n return this.thenCore(onFulfilled, onRejected, function then_main(\n onFulfilled,\n onRejected\n ) {\n // Update progress while queuing, calling, and resolving `then`.\n self.updateProgress(null, null, 1, [onFulfilled]);\n return Promise.prototype.then\n .call(this, function then_pre(val) {\n self.updateProgress(null, onFulfilled);\n return val;\n })\n .then(onFulfilled, onRejected)\n .then(function then_post(val) {\n self.updateProgress(1);\n return val;\n });\n });\n };\n\n Worker.prototype.thenCore = function thenCore(\n onFulfilled,\n onRejected,\n thenBase\n ) {\n // Handle optional thenBase parameter.\n thenBase = thenBase || Promise.prototype.then;\n\n // Wrap `this` for encapsulation and bind it to the promise handlers.\n var self = this;\n if (onFulfilled) {\n onFulfilled = onFulfilled.bind(self);\n }\n if (onRejected) {\n onRejected = onRejected.bind(self);\n }\n\n // Cast self into a Promise to avoid polyfills recursively defining `then`.\n var isNative =\n Promise.toString().indexOf(\"[native code]\") !== -1 &&\n Promise.name === \"Promise\";\n var selfPromise = isNative\n ? self\n : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n // Return the promise, after casting it into a Worker and preserving props.\n var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n return Worker.convert(returnVal, self.__proto__);\n };\n\n Worker.prototype.thenExternal = function thenExternal(\n onFulfilled,\n onRejected\n ) {\n // Call `then` and return a standard promise (exits the Worker chain).\n return Promise.prototype.then.call(this, onFulfilled, onRejected);\n };\n\n Worker.prototype.thenList = function thenList(fns) {\n // Queue a series of promise 'factories' into the promise chain.\n var self = this;\n fns.forEach(function thenList_forEach(fn) {\n self = self.thenCore(fn);\n });\n return self;\n };\n\n Worker.prototype[\"catch\"] = function(onRejected) {\n // Bind `this` to the promise handler, call `catch`, and return a Worker.\n if (onRejected) {\n onRejected = onRejected.bind(this);\n }\n var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n return Worker.convert(returnVal, this);\n };\n\n Worker.prototype.catchExternal = function catchExternal(onRejected) {\n // Call `catch` and return a standard promise (exits the Worker chain).\n return Promise.prototype[\"catch\"].call(this, onRejected);\n };\n\n Worker.prototype.error = function error(msg) {\n // Throw the error in the Promise chain.\n return this.then(function error_main() {\n throw new Error(msg);\n });\n };\n\n /* ----- ALIASES ----- */\n\n Worker.prototype.using = Worker.prototype.set;\n Worker.prototype.saveAs = Worker.prototype.save;\n Worker.prototype.export = Worker.prototype.output;\n Worker.prototype.run = Worker.prototype.then;\n\n // Get dimensions of a PDF page, as determined by jsPDF.\n jsPDF.getPageSize = function(orientation, unit, format) {\n // Decode options object\n if (typeof orientation === \"object\") {\n var options = orientation;\n orientation = options.orientation;\n unit = options.unit || unit;\n format = options.format || format;\n }\n\n // Default options\n unit = unit || \"mm\";\n format = format || \"a4\";\n orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n var format_as_string = (\"\" + format).toLowerCase();\n\n // Size in pt of various paper formats\n var pageFormats = {\n a0: [2383.94, 3370.39],\n a1: [1683.78, 2383.94],\n a2: [1190.55, 1683.78],\n a3: [841.89, 1190.55],\n a4: [595.28, 841.89],\n a5: [419.53, 595.28],\n a6: [297.64, 419.53],\n a7: [209.76, 297.64],\n a8: [147.4, 209.76],\n a9: [104.88, 147.4],\n a10: [73.7, 104.88],\n b0: [2834.65, 4008.19],\n b1: [2004.09, 2834.65],\n b2: [1417.32, 2004.09],\n b3: [1000.63, 1417.32],\n b4: [708.66, 1000.63],\n b5: [498.9, 708.66],\n b6: [354.33, 498.9],\n b7: [249.45, 354.33],\n b8: [175.75, 249.45],\n b9: [124.72, 175.75],\n b10: [87.87, 124.72],\n c0: [2599.37, 3676.54],\n c1: [1836.85, 2599.37],\n c2: [1298.27, 1836.85],\n c3: [918.43, 1298.27],\n c4: [649.13, 918.43],\n c5: [459.21, 649.13],\n c6: [323.15, 459.21],\n c7: [229.61, 323.15],\n c8: [161.57, 229.61],\n c9: [113.39, 161.57],\n c10: [79.37, 113.39],\n dl: [311.81, 623.62],\n letter: [612, 792],\n \"government-letter\": [576, 756],\n legal: [612, 1008],\n \"junior-legal\": [576, 360],\n ledger: [1224, 792],\n tabloid: [792, 1224],\n \"credit-card\": [153, 243]\n };\n\n var k;\n // Unit conversion\n switch (unit) {\n case \"pt\":\n k = 1;\n break;\n case \"mm\":\n k = 72 / 25.4;\n break;\n case \"cm\":\n k = 72 / 2.54;\n break;\n case \"in\":\n k = 72;\n break;\n case \"px\":\n k = 72 / 96;\n break;\n case \"pc\":\n k = 12;\n break;\n case \"em\":\n k = 12;\n break;\n case \"ex\":\n k = 6;\n break;\n default:\n throw \"Invalid unit: \" + unit;\n }\n var pageHeight = 0;\n var pageWidth = 0;\n\n // Dimensions are stored as user units and converted to points on output\n if (pageFormats.hasOwnProperty(format_as_string)) {\n pageHeight = pageFormats[format_as_string][1] / k;\n pageWidth = pageFormats[format_as_string][0] / k;\n } else {\n try {\n pageHeight = format[1];\n pageWidth = format[0];\n } catch (err) {\n throw new Error(\"Invalid format: \" + format);\n }\n }\n\n var tmp;\n // Handle page orientation\n if (orientation === \"p\" || orientation === \"portrait\") {\n orientation = \"p\";\n if (pageWidth > pageHeight) {\n tmp = pageWidth;\n pageWidth = pageHeight;\n pageHeight = tmp;\n }\n } else if (orientation === \"l\" || orientation === \"landscape\") {\n orientation = \"l\";\n if (pageHeight > pageWidth) {\n tmp = pageWidth;\n pageWidth = pageHeight;\n pageHeight = tmp;\n }\n } else {\n throw \"Invalid orientation: \" + orientation;\n }\n\n // Return information (k is the unit conversion ratio from pts)\n var info = {\n width: pageWidth,\n height: pageHeight,\n unit: unit,\n k: k,\n orientation: orientation\n };\n return info;\n };\n\n /**\n * @typedef FontFace\n *\n * The font-face type implements an interface similar to that of the font-face CSS rule,\n * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n * is updated.\n *\n * All properties expect values similar to those in the font-face CSS rule. A difference\n * is the font-family, which do not need to be enclosed in double-quotes when containing\n * spaces like in CSS.\n *\n * @property {string} family The name of the font-family.\n * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n * @property {string} [src] url A URL to a font of a specific format.\n * @property {string} [src] format Format of the font referenced by the URL.\n */\n\n /**\n * Generate a PDF from an HTML element or string using.\n *\n * @name html\n * @function\n * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n * @param {Object} [options] Collection of settings\n * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n *
      \n *
    • \n * false: Auto paging is disabled.\n *
    • \n *
    • \n * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly\n * slice text in half, making it difficult to read.\n *
    • \n *
    • \n * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting\n * mostly of a single column of text.\n *
    • \n *
    \n * Default is true.\n * @param {string} [options.filename] name of the file\n * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n * @param {jsPDF} [options.jsPDF] jsPDF instance\n * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n * scaled such that it fits into the specified width. Has no effect if either the html2canvas.scale is\n * specified or the windowWidth option is NOT specified.\n * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n * html2canvas.windowWidth option, this option affects the actual container size while rendering and\n * does NOT affect CSS media queries. This option only has an effect, if the width option is also specified.\n *\n * @example\n * var doc = new jsPDF();\n *\n * doc.html(document.body, {\n * callback: function (doc) {\n * doc.save();\n * },\n * x: 10,\n * y: 10\n * });\n */\n jsPDFAPI.html = function(src, options) {\n \"use strict\";\n\n options = options || {};\n options.callback = options.callback || function() {};\n options.html2canvas = options.html2canvas || {};\n options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n options.jsPDF = options.jsPDF || this;\n options.fontFaces = options.fontFaces\n ? options.fontFaces.map(normalizeFontFace)\n : null;\n\n // Create a new worker with the given options.\n var worker = new Worker(options);\n\n if (!options.worker) {\n // If worker is not set to true, perform the traditional 'simple' operation.\n return worker.from(src).doCallback();\n } else {\n // Otherwise, return the worker for new Promise-based operation.\n return worker;\n }\n };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n var jsNamesObj, jsJsObj, text;\n /**\n * @name addJS\n * @function\n * @param {string} javascript The javascript to be embedded into the PDF-file.\n * @returns {jsPDF}\n */\n jsPDFAPI.addJS = function(javascript) {\n text = javascript;\n this.internal.events.subscribe(\"postPutResources\", function() {\n jsNamesObj = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n\n jsJsObj = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/S /JavaScript\");\n this.internal.out(\"/JS (\" + text + \")\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n });\n this.internal.events.subscribe(\"putCatalog\", function() {\n if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n this.internal.out(\"/Names <>\");\n }\n });\n return this;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var namesOid;\n //var destsGoto = [];\n\n jsPDFAPI.events.push([\n \"postPutResources\",\n function() {\n var pdf = this;\n var rx = /^(\\d+) 0 obj$/;\n\n // Write action goto objects for each page\n // this.outline.destsGoto = [];\n // for (var i = 0; i < totalPages; i++) {\n // var id = pdf.internal.newObject();\n // this.outline.destsGoto.push(id);\n // pdf.internal.write(\"<> endobj\");\n // }\n //\n // for (var i = 0; i < dests.length; i++) {\n // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n // R\");\n // }\n //\n if (this.outline.root.children.length > 0) {\n var lines = pdf.outline.render().split(/\\r\\n/);\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var m = rx.exec(line);\n if (m != null) {\n var oid = m[1];\n pdf.internal.newObjectDeferredBegin(oid, false);\n }\n pdf.internal.write(line);\n }\n }\n\n // This code will write named destination for each page reference\n // (page_1, etc)\n if (this.outline.createNamedDestinations) {\n var totalPages = this.internal.pages.length;\n // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n // follow 5, 7, 9, etc\n // Write destination objects for each page\n var dests = [];\n for (var i = 0; i < totalPages; i++) {\n var id = pdf.internal.newObject();\n dests.push(id);\n var info = pdf.internal.getPageInfo(i + 1);\n pdf.internal.write(\n \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n );\n }\n\n // assign a name for each destination\n var names2Oid = pdf.internal.newObject();\n pdf.internal.write(\"<< /Names [ \");\n for (var i = 0; i < dests.length; i++) {\n pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n }\n pdf.internal.write(\" ] >>\", \"endobj\");\n\n // var kids = pdf.internal.newObject();\n // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n // pdf.internal.write(' ] >>', 'endobj');\n\n namesOid = pdf.internal.newObject();\n pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n pdf.internal.write(\">>\", \"endobj\");\n }\n }\n ]);\n\n jsPDFAPI.events.push([\n \"putCatalog\",\n function() {\n var pdf = this;\n if (pdf.outline.root.children.length > 0) {\n pdf.internal.write(\n \"/Outlines\",\n this.outline.makeRef(this.outline.root)\n );\n if (this.outline.createNamedDestinations) {\n pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n }\n // Open with Bookmarks showing\n // pdf.internal.write(\"/PageMode /UseOutlines\");\n }\n }\n ]);\n\n jsPDFAPI.events.push([\n \"initialized\",\n function() {\n var pdf = this;\n\n pdf.outline = {\n createNamedDestinations: false,\n root: {\n children: []\n }\n };\n\n /**\n * Options: pageNumber\n */\n pdf.outline.add = function(parent, title, options) {\n var item = {\n title: title,\n options: options,\n children: []\n };\n if (parent == null) {\n parent = this.root;\n }\n parent.children.push(item);\n return item;\n };\n\n pdf.outline.render = function() {\n this.ctx = {};\n this.ctx.val = \"\";\n this.ctx.pdf = pdf;\n\n this.genIds_r(this.root);\n this.renderRoot(this.root);\n this.renderItems(this.root);\n\n return this.ctx.val;\n };\n\n pdf.outline.genIds_r = function(node) {\n node.id = pdf.internal.newObjectDeferred();\n for (var i = 0; i < node.children.length; i++) {\n this.genIds_r(node.children[i]);\n }\n };\n\n pdf.outline.renderRoot = function(node) {\n this.objStart(node);\n this.line(\"/Type /Outlines\");\n if (node.children.length > 0) {\n this.line(\"/First \" + this.makeRef(node.children[0]));\n this.line(\n \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n );\n }\n this.line(\n \"/Count \" +\n this.count_r(\n {\n count: 0\n },\n node\n )\n );\n this.objEnd();\n };\n\n pdf.outline.renderItems = function(node) {\n var getVerticalCoordinateString = this.ctx.pdf.internal\n .getVerticalCoordinateString;\n for (var i = 0; i < node.children.length; i++) {\n var item = node.children[i];\n this.objStart(item);\n\n this.line(\"/Title \" + this.makeString(item.title));\n\n this.line(\"/Parent \" + this.makeRef(node));\n if (i > 0) {\n this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n }\n if (i < node.children.length - 1) {\n this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n }\n if (item.children.length > 0) {\n this.line(\"/First \" + this.makeRef(item.children[0]));\n this.line(\n \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n );\n }\n\n var count = (this.count = this.count_r(\n {\n count: 0\n },\n item\n ));\n if (count > 0) {\n this.line(\"/Count \" + count);\n }\n\n if (item.options) {\n if (item.options.pageNumber) {\n // Explicit Destination\n //WARNING this assumes page ids are 3,5,7, etc.\n var info = pdf.internal.getPageInfo(item.options.pageNumber);\n this.line(\n \"/Dest \" +\n \"[\" +\n info.objId +\n \" 0 R /XYZ 0 \" +\n getVerticalCoordinateString(0) +\n \" 0]\"\n );\n // this line does not work on all clients (pageNumber instead of page ref)\n //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n // Named Destination\n // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n // Action Destination\n // var id = pdf.internal.newObject();\n // pdf.internal.write('<> endobj');\n // this.line('/A ' + id + ' 0 R' );\n }\n }\n this.objEnd();\n }\n for (var z = 0; z < node.children.length; z++) {\n this.renderItems(node.children[z]);\n }\n };\n\n pdf.outline.line = function(text) {\n this.ctx.val += text + \"\\r\\n\";\n };\n\n pdf.outline.makeRef = function(node) {\n return node.id + \" 0 R\";\n };\n\n pdf.outline.makeString = function(val) {\n return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n };\n\n pdf.outline.objStart = function(node) {\n this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n };\n\n pdf.outline.objEnd = function() {\n this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n };\n\n pdf.outline.count_r = function(ctx, node) {\n for (var i = 0; i < node.children.length; i++) {\n ctx.count++;\n this.count_r(ctx, node.children[i]);\n }\n return ctx.count;\n };\n }\n ]);\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * 0xc0 (SOF) Huffman - Baseline DCT\n * 0xc1 (SOF) Huffman - Extended sequential DCT\n * 0xc2 Progressive DCT (SOF2)\n * 0xc3 Spatial (sequential) lossless (SOF3)\n * 0xc4 Differential sequential DCT (SOF5)\n * 0xc5 Differential progressive DCT (SOF6)\n * 0xc6 Differential spatial (SOF7)\n * 0xc7\n */\n var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n //takes a string imgData containing the raw bytes of\n //a jpeg image and returns [width, height]\n //Algorithm from: http://www.64lines.com/jpeg-width-height\n var getJpegInfo = function(imgData) {\n var width, height, numcomponents;\n var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n var len = imgData.length;\n var result = { width: 0, height: 0, numcomponents: 1 };\n for (var i = 4; i < len; i += 2) {\n i += blockLength;\n if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n numcomponents = imgData.charCodeAt(i + 9);\n result = { width: width, height: height, numcomponents: numcomponents };\n break;\n } else {\n blockLength =\n imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n }\n }\n return result;\n };\n\n /**\n * @ignore\n */\n jsPDFAPI.processJPEG = function(\n data,\n index,\n alias,\n compression,\n dataAsBinaryString,\n colorSpace\n ) {\n var filter = this.decode.DCT_DECODE,\n bpc = 8,\n dims,\n result = null;\n\n if (\n typeof data === \"string\" ||\n this.__addimage__.isArrayBuffer(data) ||\n this.__addimage__.isArrayBufferView(data)\n ) {\n // if we already have a stored binary string rep use that\n data = dataAsBinaryString || data;\n data = this.__addimage__.isArrayBuffer(data)\n ? new Uint8Array(data)\n : data;\n data = this.__addimage__.isArrayBufferView(data)\n ? this.__addimage__.arrayBufferToBinaryString(data)\n : data;\n\n dims = getJpegInfo(data);\n switch (dims.numcomponents) {\n case 1:\n colorSpace = this.color_spaces.DEVICE_GRAY;\n break;\n case 4:\n colorSpace = this.color_spaces.DEVICE_CMYK;\n break;\n case 3:\n colorSpace = this.color_spaces.DEVICE_RGB;\n break;\n }\n\n result = {\n data: data,\n width: dims.width,\n height: dims.height,\n colorSpace: colorSpace,\n bitsPerComponent: bpc,\n filter: filter,\n index: index,\n alias: alias\n };\n }\n return result;\n };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n var APNG_BLEND_OP_OVER,\n APNG_BLEND_OP_SOURCE,\n APNG_DISPOSE_OP_BACKGROUND,\n APNG_DISPOSE_OP_NONE,\n APNG_DISPOSE_OP_PREVIOUS,\n makeImage,\n scratchCanvas,\n scratchCtx;\n\n APNG_DISPOSE_OP_NONE = 0;\n\n APNG_DISPOSE_OP_BACKGROUND = 1;\n\n APNG_DISPOSE_OP_PREVIOUS = 2;\n\n APNG_BLEND_OP_SOURCE = 0;\n\n APNG_BLEND_OP_OVER = 1;\n\n function PNG(data) {\n var chunkSize,\n colors,\n palLen,\n delayDen,\n delayNum,\n frame,\n i,\n index,\n key,\n section,\n palShort,\n text,\n _i,\n _j,\n _ref;\n this.data = data;\n this.pos = 8;\n this.palette = [];\n this.imgData = [];\n this.transparency = {};\n this.animation = null;\n this.text = {};\n frame = null;\n while (true) {\n chunkSize = this.readUInt32();\n section = function() {\n var _i, _results;\n _results = [];\n for (i = _i = 0; _i < 4; i = ++_i) {\n _results.push(String.fromCharCode(this.data[this.pos++]));\n }\n return _results;\n }\n .call(this)\n .join(\"\");\n switch (section) {\n case \"IHDR\":\n this.width = this.readUInt32();\n this.height = this.readUInt32();\n this.bits = this.data[this.pos++];\n this.colorType = this.data[this.pos++];\n this.compressionMethod = this.data[this.pos++];\n this.filterMethod = this.data[this.pos++];\n this.interlaceMethod = this.data[this.pos++];\n break;\n case \"acTL\":\n this.animation = {\n numFrames: this.readUInt32(),\n numPlays: this.readUInt32() || Infinity,\n frames: []\n };\n break;\n case \"PLTE\":\n this.palette = this.read(chunkSize);\n break;\n case \"fcTL\":\n if (frame) {\n this.animation.frames.push(frame);\n }\n this.pos += 4;\n frame = {\n width: this.readUInt32(),\n height: this.readUInt32(),\n xOffset: this.readUInt32(),\n yOffset: this.readUInt32()\n };\n delayNum = this.readUInt16();\n delayDen = this.readUInt16() || 100;\n frame.delay = (1000 * delayNum) / delayDen;\n frame.disposeOp = this.data[this.pos++];\n frame.blendOp = this.data[this.pos++];\n frame.data = [];\n break;\n case \"IDAT\":\n case \"fdAT\":\n if (section === \"fdAT\") {\n this.pos += 4;\n chunkSize -= 4;\n }\n data = (frame != null ? frame.data : void 0) || this.imgData;\n for (\n i = _i = 0;\n 0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n i = 0 <= chunkSize ? ++_i : --_i\n ) {\n data.push(this.data[this.pos++]);\n }\n break;\n case \"tRNS\":\n this.transparency = {};\n switch (this.colorType) {\n case 3:\n palLen = this.palette.length / 3;\n this.transparency.indexed = this.read(chunkSize);\n if (this.transparency.indexed.length > palLen)\n throw new Error(\"More transparent colors than palette size\");\n /*\n * According to the PNG spec trns should be increased to the same size as palette if shorter\n */\n //palShort = 255 - this.transparency.indexed.length;\n palShort = palLen - this.transparency.indexed.length;\n if (palShort > 0) {\n for (\n i = _j = 0;\n 0 <= palShort ? _j < palShort : _j > palShort;\n i = 0 <= palShort ? ++_j : --_j\n ) {\n this.transparency.indexed.push(255);\n }\n }\n break;\n case 0:\n this.transparency.grayscale = this.read(chunkSize)[0];\n break;\n case 2:\n this.transparency.rgb = this.read(chunkSize);\n }\n break;\n case \"tEXt\":\n text = this.read(chunkSize);\n index = text.indexOf(0);\n key = String.fromCharCode.apply(String, text.slice(0, index));\n this.text[key] = String.fromCharCode.apply(\n String,\n text.slice(index + 1)\n );\n break;\n case \"IEND\":\n if (frame) {\n this.animation.frames.push(frame);\n }\n this.colors = function() {\n switch (this.colorType) {\n case 0:\n case 3:\n case 4:\n return 1;\n case 2:\n case 6:\n return 3;\n }\n }.call(this);\n this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n this.pixelBitlength = this.bits * colors;\n this.colorSpace = function() {\n switch (this.colors) {\n case 1:\n return \"DeviceGray\";\n case 3:\n return \"DeviceRGB\";\n }\n }.call(this);\n this.imgData = new Uint8Array(this.imgData);\n return;\n default:\n this.pos += chunkSize;\n }\n this.pos += 4;\n if (this.pos > this.data.length) {\n throw new Error(\"Incomplete or corrupt PNG file\");\n }\n }\n }\n\n PNG.prototype.read = function(bytes) {\n var i, _i, _results;\n _results = [];\n for (\n i = _i = 0;\n 0 <= bytes ? _i < bytes : _i > bytes;\n i = 0 <= bytes ? ++_i : --_i\n ) {\n _results.push(this.data[this.pos++]);\n }\n return _results;\n };\n\n PNG.prototype.readUInt32 = function() {\n var b1, b2, b3, b4;\n b1 = this.data[this.pos++] << 24;\n b2 = this.data[this.pos++] << 16;\n b3 = this.data[this.pos++] << 8;\n b4 = this.data[this.pos++];\n return b1 | b2 | b3 | b4;\n };\n\n PNG.prototype.readUInt16 = function() {\n var b1, b2;\n b1 = this.data[this.pos++] << 8;\n b2 = this.data[this.pos++];\n return b1 | b2;\n };\n\n PNG.prototype.decodePixels = function(data) {\n var pixelBytes = this.pixelBitlength / 8;\n var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n var pos = 0;\n var _this = this;\n\n if (data == null) {\n data = this.imgData;\n }\n if (data.length === 0) {\n return new Uint8Array(0);\n }\n\n data = unzlibSync(data);\n function pass(x0, y0, dx, dy) {\n var abyte,\n c,\n col,\n i,\n left,\n length,\n p,\n pa,\n paeth,\n pb,\n pc,\n pixels,\n row,\n scanlineLength,\n upper,\n upperLeft,\n _i,\n _j,\n _k,\n _l,\n _m;\n var w = Math.ceil((_this.width - x0) / dx),\n h = Math.ceil((_this.height - y0) / dy);\n var isFull = _this.width == w && _this.height == h;\n scanlineLength = pixelBytes * w;\n pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n length = data.length;\n row = 0;\n c = 0;\n while (row < h && pos < length) {\n switch (data[pos++]) {\n case 0:\n for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n pixels[c++] = data[pos++];\n }\n break;\n case 1:\n for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n abyte = data[pos++];\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n pixels[c++] = (abyte + left) % 256;\n }\n break;\n case 2:\n for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n upper =\n row &&\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n pixels[c++] = (upper + abyte) % 256;\n }\n break;\n case 3:\n for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n upper =\n row &&\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n }\n break;\n case 4:\n for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n if (row === 0) {\n upper = upperLeft = 0;\n } else {\n upper =\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n upperLeft =\n col &&\n pixels[\n (row - 1) * scanlineLength +\n (col - 1) * pixelBytes +\n (i % pixelBytes)\n ];\n }\n p = left + upper - upperLeft;\n pa = Math.abs(p - left);\n pb = Math.abs(p - upper);\n pc = Math.abs(p - upperLeft);\n if (pa <= pb && pa <= pc) {\n paeth = left;\n } else if (pb <= pc) {\n paeth = upper;\n } else {\n paeth = upperLeft;\n }\n pixels[c++] = (abyte + paeth) % 256;\n }\n break;\n default:\n throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n }\n if (!isFull) {\n var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n var partPos = row * scanlineLength;\n for (i = 0; i < w; i += 1) {\n for (var j = 0; j < pixelBytes; j += 1)\n fullPixels[fullPos++] = pixels[partPos++];\n fullPos += (dx - 1) * pixelBytes;\n }\n }\n row++;\n }\n }\n if (_this.interlaceMethod == 1) {\n /*\n 1 6 4 6 2 6 4 6\n 7 7 7 7 7 7 7 7\n 5 6 5 6 5 6 5 6\n 7 7 7 7 7 7 7 7\n 3 6 4 6 3 6 4 6\n 7 7 7 7 7 7 7 7\n 5 6 5 6 5 6 5 6\n 7 7 7 7 7 7 7 7\n */\n pass(0, 0, 8, 8); // 1\n /* NOTE these seem to follow the pattern:\n * pass(x, 0, 2*x, 2*x);\n * pass(0, x, x, 2*x);\n * with x being 4, 2, 1.\n */\n pass(4, 0, 8, 8); // 2\n pass(0, 4, 4, 8); // 3\n\n pass(2, 0, 4, 4); // 4\n pass(0, 2, 2, 4); // 5\n\n pass(1, 0, 2, 2); // 6\n pass(0, 1, 1, 2); // 7\n } else {\n pass(0, 0, 1, 1);\n }\n return fullPixels;\n };\n\n PNG.prototype.decodePalette = function() {\n var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n palette = this.palette;\n transparency = this.transparency.indexed || [];\n ret = new Uint8Array((transparency.length || 0) + palette.length);\n pos = 0;\n length = palette.length;\n c = 0;\n for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n ret[pos++] = palette[i];\n ret[pos++] = palette[i + 1];\n ret[pos++] = palette[i + 2];\n ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n }\n return ret;\n };\n\n PNG.prototype.copyToImageData = function(imageData, pixels) {\n var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n colors = this.colors;\n palette = null;\n alpha = this.hasAlphaChannel;\n if (this.palette.length) {\n palette =\n (_ref = this._decodedPalette) != null\n ? _ref\n : (this._decodedPalette = this.decodePalette());\n colors = 4;\n alpha = true;\n }\n data = imageData.data || imageData;\n length = data.length;\n input = palette || pixels;\n i = j = 0;\n if (colors === 1) {\n while (i < length) {\n k = palette ? pixels[i / 4] * 4 : j;\n v = input[k++];\n data[i++] = v;\n data[i++] = v;\n data[i++] = v;\n data[i++] = alpha ? input[k++] : 255;\n j = k;\n }\n } else {\n while (i < length) {\n k = palette ? pixels[i / 4] * 4 : j;\n data[i++] = input[k++];\n data[i++] = input[k++];\n data[i++] = input[k++];\n data[i++] = alpha ? input[k++] : 255;\n j = k;\n }\n }\n };\n\n PNG.prototype.decode = function() {\n var ret;\n ret = new Uint8Array(this.width * this.height * 4);\n this.copyToImageData(ret, this.decodePixels());\n return ret;\n };\n\n var hasBrowserCanvas = function() {\n if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n try {\n scratchCanvas = globalObject.document.createElement(\"canvas\");\n scratchCtx = scratchCanvas.getContext(\"2d\");\n } catch (e) {\n return false;\n }\n return true;\n }\n return false;\n };\n\n hasBrowserCanvas();\n\n makeImage = function(imageData) {\n if (hasBrowserCanvas() === true) {\n var img;\n scratchCtx.width = imageData.width;\n scratchCtx.height = imageData.height;\n scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n scratchCtx.putImageData(imageData, 0, 0);\n img = new Image();\n img.src = scratchCanvas.toDataURL();\n return img;\n }\n throw new Error(\"This method requires a Browser with Canvas-capability.\");\n };\n\n PNG.prototype.decodeFrames = function(ctx) {\n var frame, i, imageData, pixels, _i, _len, _ref, _results;\n if (!this.animation) {\n return;\n }\n _ref = this.animation.frames;\n _results = [];\n for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n frame = _ref[i];\n imageData = ctx.createImageData(frame.width, frame.height);\n pixels = this.decodePixels(new Uint8Array(frame.data));\n this.copyToImageData(imageData, pixels);\n frame.imageData = imageData;\n _results.push((frame.image = makeImage(imageData)));\n }\n return _results;\n };\n\n PNG.prototype.renderFrame = function(ctx, number) {\n var frame, frames, prev;\n frames = this.animation.frames;\n frame = frames[number];\n prev = frames[number - 1];\n if (number === 0) {\n ctx.clearRect(0, 0, this.width, this.height);\n }\n if (\n (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n ) {\n ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n } else if (\n (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n ) {\n ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n }\n if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n }\n return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n };\n\n PNG.prototype.animate = function(ctx) {\n var doFrame,\n frameNumber,\n frames,\n numFrames,\n numPlays,\n _ref,\n _this = this;\n frameNumber = 0;\n (_ref = this.animation),\n (numFrames = _ref.numFrames),\n (frames = _ref.frames),\n (numPlays = _ref.numPlays);\n return (doFrame = function() {\n var f, frame;\n f = frameNumber++ % numFrames;\n frame = frames[f];\n _this.renderFrame(ctx, f);\n if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n }\n })();\n };\n\n PNG.prototype.stopAnimation = function() {\n var _ref;\n return clearTimeout(\n (_ref = this.animation) != null ? _ref._timeout : void 0\n );\n };\n\n PNG.prototype.render = function(canvas) {\n var ctx, data;\n if (canvas._png) {\n canvas._png.stopAnimation();\n }\n canvas._png = this;\n canvas.width = this.width;\n canvas.height = this.height;\n ctx = canvas.getContext(\"2d\");\n if (this.animation) {\n this.decodeFrames(ctx);\n return this.animate(ctx);\n } else {\n data = ctx.createImageData(this.width, this.height);\n this.copyToImageData(data, this.decodePixels());\n return ctx.putImageData(data, 0, 0);\n }\n };\n\n return PNG;\n})();\n\nexport { PNG };\n","/**\n * @license\n * (c) Dean McNamee , 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression. It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n var p = 0;\n\n var gopts = gopts === undefined ? {} : gopts;\n var loop_count = gopts.loop === undefined ? null : gopts.loop;\n var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n throw new Error(\"Width/Height invalid.\");\n\n function check_palette_and_num_colors(palette) {\n var num_colors = palette.length;\n if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n throw new Error(\n \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n );\n }\n return num_colors;\n }\n\n // - Header.\n buf[p++] = 0x47;\n buf[p++] = 0x49;\n buf[p++] = 0x46; // GIF\n buf[p++] = 0x38;\n buf[p++] = 0x39;\n buf[p++] = 0x61; // 89a\n\n // Handling of Global Color Table (palette) and background index.\n var gp_num_colors_pow2 = 0;\n var background = 0;\n if (global_palette !== null) {\n var gp_num_colors = check_palette_and_num_colors(global_palette);\n while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n gp_num_colors = 1 << gp_num_colors_pow2;\n --gp_num_colors_pow2;\n if (gopts.background !== undefined) {\n background = gopts.background;\n if (background >= gp_num_colors)\n throw new Error(\"Background index out of range.\");\n // The GIF spec states that a background index of 0 should be ignored, so\n // this is probably a mistake and you really want to set it to another\n // slot in the palette. But actually in the end most browsers, etc end\n // up ignoring this almost completely (including for dispose background).\n if (background === 0)\n throw new Error(\"Background index explicitly passed as 0.\");\n }\n }\n\n // - Logical Screen Descriptor.\n // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n buf[p++] = width & 0xff;\n buf[p++] = (width >> 8) & 0xff;\n buf[p++] = height & 0xff;\n buf[p++] = (height >> 8) & 0xff;\n // NOTE: Indicates 0-bpp original color resolution (unused?).\n buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n buf[p++] = background; // Background Color Index.\n buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n // - Global Color Table\n if (global_palette !== null) {\n for (var i = 0, il = global_palette.length; i < il; ++i) {\n var rgb = global_palette[i];\n buf[p++] = (rgb >> 16) & 0xff;\n buf[p++] = (rgb >> 8) & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n if (loop_count !== null) {\n // Netscape block for looping.\n if (loop_count < 0 || loop_count > 65535)\n throw new Error(\"Loop count invalid.\");\n // Extension code, label, and length.\n buf[p++] = 0x21;\n buf[p++] = 0xff;\n buf[p++] = 0x0b;\n // NETSCAPE2.0\n buf[p++] = 0x4e;\n buf[p++] = 0x45;\n buf[p++] = 0x54;\n buf[p++] = 0x53;\n buf[p++] = 0x43;\n buf[p++] = 0x41;\n buf[p++] = 0x50;\n buf[p++] = 0x45;\n buf[p++] = 0x32;\n buf[p++] = 0x2e;\n buf[p++] = 0x30;\n // Sub-block\n buf[p++] = 0x03;\n buf[p++] = 0x01;\n buf[p++] = loop_count & 0xff;\n buf[p++] = (loop_count >> 8) & 0xff;\n buf[p++] = 0x00; // Terminator.\n }\n\n var ended = false;\n\n this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n if (ended === true) {\n --p;\n ended = false;\n } // Un-end.\n\n opts = opts === undefined ? {} : opts;\n\n // TODO(deanm): Bounds check x, y. Do they need to be within the virtual\n // canvas width/height, I imagine?\n if (x < 0 || y < 0 || x > 65535 || y > 65535)\n throw new Error(\"x/y invalid.\");\n\n if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n throw new Error(\"Width/Height invalid.\");\n\n if (indexed_pixels.length < w * h)\n throw new Error(\"Not enough pixels for the frame size.\");\n\n var using_local_palette = true;\n var palette = opts.palette;\n if (palette === undefined || palette === null) {\n using_local_palette = false;\n palette = global_palette;\n }\n\n if (palette === undefined || palette === null)\n throw new Error(\"Must supply either a local or global palette.\");\n\n var num_colors = check_palette_and_num_colors(palette);\n\n // Compute the min_code_size (power of 2), destroying num_colors.\n var min_code_size = 0;\n while ((num_colors >>= 1)) ++min_code_size;\n num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n var delay = opts.delay === undefined ? 0 : opts.delay;\n\n // From the spec:\n // 0 - No disposal specified. The decoder is\n // not required to take any action.\n // 1 - Do not dispose. The graphic is to be left\n // in place.\n // 2 - Restore to background color. The area used by the\n // graphic must be restored to the background color.\n // 3 - Restore to previous. The decoder is required to\n // restore the area overwritten by the graphic with\n // what was there prior to rendering the graphic.\n // 4-7 - To be defined.\n // NOTE(deanm): Dispose background doesn't really work, apparently most\n // browsers ignore the background palette index and clear to transparency.\n var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n if (disposal < 0 || disposal > 3)\n // 4-7 is reserved.\n throw new Error(\"Disposal out of range.\");\n\n var use_transparency = false;\n var transparent_index = 0;\n if (opts.transparent !== undefined && opts.transparent !== null) {\n use_transparency = true;\n transparent_index = opts.transparent;\n if (transparent_index < 0 || transparent_index >= num_colors)\n throw new Error(\"Transparent color index.\");\n }\n\n if (disposal !== 0 || use_transparency || delay !== 0) {\n // - Graphics Control Extension\n buf[p++] = 0x21;\n buf[p++] = 0xf9; // Extension / Label.\n buf[p++] = 4; // Byte size.\n\n buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n buf[p++] = delay & 0xff;\n buf[p++] = (delay >> 8) & 0xff;\n buf[p++] = transparent_index; // Transparent color index.\n buf[p++] = 0; // Block Terminator.\n }\n\n // - Image Descriptor\n buf[p++] = 0x2c; // Image Seperator.\n buf[p++] = x & 0xff;\n buf[p++] = (x >> 8) & 0xff; // Left.\n buf[p++] = y & 0xff;\n buf[p++] = (y >> 8) & 0xff; // Top.\n buf[p++] = w & 0xff;\n buf[p++] = (w >> 8) & 0xff;\n buf[p++] = h & 0xff;\n buf[p++] = (h >> 8) & 0xff;\n // NOTE: No sort flag (unused?).\n // TODO(deanm): Support interlace.\n buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n // - Local Color Table\n if (using_local_palette === true) {\n for (var i = 0, il = palette.length; i < il; ++i) {\n var rgb = palette[i];\n buf[p++] = (rgb >> 16) & 0xff;\n buf[p++] = (rgb >> 8) & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n p = GifWriterOutputLZWCodeStream(\n buf,\n p,\n min_code_size < 2 ? 2 : min_code_size,\n indexed_pixels\n );\n\n return p;\n };\n\n this.end = function() {\n if (ended === false) {\n buf[p++] = 0x3b; // Trailer.\n ended = true;\n }\n return p;\n };\n\n this.getOutputBuffer = function() {\n return buf;\n };\n this.setOutputBuffer = function(v) {\n buf = v;\n };\n this.getOutputBufferPosition = function() {\n return p;\n };\n this.setOutputBufferPosition = function(v) {\n p = v;\n };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n buf[p++] = min_code_size;\n var cur_subblock = p++; // Pointing at the length field.\n\n var clear_code = 1 << min_code_size;\n var code_mask = clear_code - 1;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n var cur_shift = 0;\n // We have at most 12-bit codes, so we should have to hold a max of 19\n // bits here (and then we would write out).\n var cur = 0;\n\n function emit_bytes_to_buffer(bit_block_size) {\n while (cur_shift >= bit_block_size) {\n buf[p++] = cur & 0xff;\n cur >>= 8;\n cur_shift -= 8;\n if (p === cur_subblock + 256) {\n // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n }\n\n function emit_code(c) {\n cur |= c << cur_shift;\n cur_shift += cur_code_size;\n emit_bytes_to_buffer(8);\n }\n\n // I am not an expert on the topic, and I don't want to write a thesis.\n // However, it is good to outline here the basic algorithm and the few data\n // structures and optimizations here that make this implementation fast.\n // The basic idea behind LZW is to build a table of previously seen runs\n // addressed by a short id (herein called output code). All data is\n // referenced by a code, which represents one or more values from the\n // original input stream. All input bytes can be referenced as the same\n // value as an output code. So if you didn't want any compression, you\n // could more or less just output the original bytes as codes (there are\n // some details to this, but it is the idea). In order to achieve\n // compression, values greater then the input range (codes can be up to\n // 12-bit while input only 8-bit) represent a sequence of previously seen\n // inputs. The decompressor is able to build the same mapping while\n // decoding, so there is always a shared common knowledge between the\n // encoding and decoder, which is also important for \"timing\" aspects like\n // how to handle variable bit width code encoding.\n //\n // One obvious but very important consequence of the table system is there\n // is always a unique id (at most 12-bits) to map the runs. 'A' might be\n // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc. This relationship\n // can be used for an effecient lookup strategy for the code mapping. We\n // need to know if a run has been seen before, and be able to map that run\n // to the output code. Since we start with known unique ids (input bytes),\n // and then from those build more unique ids (table entries), we can\n // continue this chain (almost like a linked list) to always have small\n // integer values that represent the current byte chains in the encoder.\n // This means instead of tracking the input bytes (AAAABCD) to know our\n // current state, we can track the table entry for AAAABC (it is guaranteed\n // to exist by the nature of the algorithm) and the next character D.\n // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n // unique. This allows us to create a simple lookup key for mapping input\n // sequences to codes (table indices) without having to store or search\n // any of the code sequences. So if 'AAAA' has a table entry of 12, the\n // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n // key. This leads to a integer value at most 20-bits, which can always\n // fit in an SMI value and be used as a fast sparse array / object key.\n\n // Output code for the current contents of the index buffer.\n var ib_code = index_stream[0] & code_mask; // Load first input index.\n var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n emit_code(clear_code); // Spec says first code should be a clear code.\n\n // First index already loaded, process the rest of the stream.\n for (var i = 1, il = index_stream.length; i < il; ++i) {\n var k = index_stream[i] & code_mask;\n var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n var cur_code = code_table[cur_key]; // buffer + k.\n\n // Check if we have to create a new code table entry.\n if (cur_code === undefined) {\n // We don't have buffer + k.\n // Emit index buffer (without k).\n // This is an inline version of emit_code, because this is the core\n // writing routine of the compressor (and V8 cannot inline emit_code\n // because it is a closure here in a different context). Additionally\n // we can call emit_byte_to_buffer less often, because we can have\n // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n // be 12-bits, so can safely have 18-bits there without overflow.\n // emit_code(ib_code);\n cur |= ib_code << cur_shift;\n cur_shift += cur_code_size;\n while (cur_shift >= 8) {\n buf[p++] = cur & 0xff;\n cur >>= 8;\n cur_shift -= 8;\n if (p === cur_subblock + 256) {\n // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n\n if (next_code === 4096) {\n // Table full, need a clear.\n emit_code(clear_code);\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_table = {};\n } else {\n // Table not full, insert a new entry.\n // Increase our variable bit code sizes if necessary. This is a bit\n // tricky as it is based on \"timing\" between the encoding and\n // decoder. From the encoders perspective this should happen after\n // we've already emitted the index buffer and are about to create the\n // first table entry that would overflow our current code bit size.\n if (next_code >= 1 << cur_code_size) ++cur_code_size;\n code_table[cur_key] = next_code++; // Insert into code table.\n }\n\n ib_code = k; // Index buffer to single input k.\n } else {\n ib_code = cur_code; // Index buffer to sequence in code table.\n }\n }\n\n emit_code(ib_code); // There will still be something in the index buffer.\n emit_code(eoi_code); // End Of Information.\n\n // Flush / finalize the sub-blocks stream to the buffer.\n emit_bytes_to_buffer(1);\n\n // Finish the sub-blocks, writing out any unfinished lengths and\n // terminating with a sub-block of length 0. If we have already started\n // but not yet used a sub-block it can just become the terminator.\n if (cur_subblock + 1 === p) {\n // Started but unused.\n buf[cur_subblock] = 0;\n } else {\n // Started and used, write length and additional terminator block.\n buf[cur_subblock] = p - cur_subblock - 1;\n buf[p++] = 0;\n }\n return p;\n}\n\nfunction GifReader(buf) {\n var p = 0;\n\n // - Header (GIF87a or GIF89a).\n if (\n buf[p++] !== 0x47 ||\n buf[p++] !== 0x49 ||\n buf[p++] !== 0x46 ||\n buf[p++] !== 0x38 ||\n ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n buf[p++] !== 0x61\n ) {\n throw new Error(\"Invalid GIF 87a/89a header.\");\n }\n\n // - Logical Screen Descriptor.\n var width = buf[p++] | (buf[p++] << 8);\n var height = buf[p++] | (buf[p++] << 8);\n var pf0 = buf[p++]; // .\n var global_palette_flag = pf0 >> 7;\n var num_global_colors_pow2 = pf0 & 0x7;\n var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n var background = buf[p++];\n buf[p++]; // Pixel aspect ratio (unused?).\n\n var global_palette_offset = null;\n var global_palette_size = null;\n\n if (global_palette_flag) {\n global_palette_offset = p;\n global_palette_size = num_global_colors;\n p += num_global_colors * 3; // Seek past palette.\n }\n\n var no_eof = true;\n\n var frames = [];\n\n var delay = 0;\n var transparent_index = null;\n var disposal = 0; // 0 - No disposal specified.\n var loop_count = null;\n\n this.width = width;\n this.height = height;\n\n while (no_eof && p < buf.length) {\n switch (buf[p++]) {\n case 0x21: // Graphics Control Extension Block\n switch (buf[p++]) {\n case 0xff: // Application specific block\n // Try if it's a Netscape block (with animation loop counter).\n if (\n buf[p] !== 0x0b || // 21 FF already read, check block size.\n // NETSCAPE2.0\n (buf[p + 1] == 0x4e &&\n buf[p + 2] == 0x45 &&\n buf[p + 3] == 0x54 &&\n buf[p + 4] == 0x53 &&\n buf[p + 5] == 0x43 &&\n buf[p + 6] == 0x41 &&\n buf[p + 7] == 0x50 &&\n buf[p + 8] == 0x45 &&\n buf[p + 9] == 0x32 &&\n buf[p + 10] == 0x2e &&\n buf[p + 11] == 0x30 &&\n // Sub-block\n buf[p + 12] == 0x03 &&\n buf[p + 13] == 0x01 &&\n buf[p + 16] == 0)\n ) {\n p += 14;\n loop_count = buf[p++] | (buf[p++] << 8);\n p++; // Skip terminator.\n } else {\n // We don't know what it is, just try to get past it.\n p += 12;\n while (true) {\n // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n }\n break;\n\n case 0xf9: // Graphics Control Extension\n if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n throw new Error(\"Invalid graphics extension block.\");\n var pf1 = buf[p++];\n delay = buf[p++] | (buf[p++] << 8);\n transparent_index = buf[p++];\n if ((pf1 & 1) === 0) transparent_index = null;\n disposal = (pf1 >> 2) & 0x7;\n p++; // Skip terminator.\n break;\n\n case 0xfe: // Comment Extension.\n while (true) {\n // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n // console.log(buf.slice(p, p+block_size).toString('ascii'));\n p += block_size;\n }\n break;\n\n default:\n throw new Error(\n \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n );\n }\n break;\n\n case 0x2c: // Image Descriptor.\n var x = buf[p++] | (buf[p++] << 8);\n var y = buf[p++] | (buf[p++] << 8);\n var w = buf[p++] | (buf[p++] << 8);\n var h = buf[p++] | (buf[p++] << 8);\n var pf2 = buf[p++];\n var local_palette_flag = pf2 >> 7;\n var interlace_flag = (pf2 >> 6) & 1;\n var num_local_colors_pow2 = pf2 & 0x7;\n var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n var palette_offset = global_palette_offset;\n var palette_size = global_palette_size;\n var has_local_palette = false;\n if (local_palette_flag) {\n var has_local_palette = true;\n palette_offset = p; // Override with local palette.\n palette_size = num_local_colors;\n p += num_local_colors * 3; // Seek past palette.\n }\n\n var data_offset = p;\n\n p++; // codesize\n while (true) {\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n\n frames.push({\n x: x,\n y: y,\n width: w,\n height: h,\n has_local_palette: has_local_palette,\n palette_offset: palette_offset,\n palette_size: palette_size,\n data_offset: data_offset,\n data_length: p - data_offset,\n transparent_index: transparent_index,\n interlaced: !!interlace_flag,\n delay: delay,\n disposal: disposal\n });\n break;\n\n case 0x3b: // Trailer Marker (end of file).\n no_eof = false;\n break;\n\n default:\n throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n break;\n }\n }\n\n this.numFrames = function() {\n return frames.length;\n };\n\n this.loopCount = function() {\n return loop_count;\n };\n\n this.frameInfo = function(frame_num) {\n if (frame_num < 0 || frame_num >= frames.length)\n throw new Error(\"Frame index out of range.\");\n return frames[frame_num];\n };\n\n this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf,\n frame.data_offset,\n index_stream,\n num_pixels\n );\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indices of the top left and bottom right corners of the subrect.\n var opbeg = (frame.y * width + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) {\n // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) {\n // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = b;\n pixels[op++] = g;\n pixels[op++] = r;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n\n // I will go to copy and paste hell one day...\n this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf,\n frame.data_offset,\n index_stream,\n num_pixels\n );\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indices of the top left and bottom right corners of the subrect.\n var opbeg = (frame.y * width + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) {\n // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) {\n // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = r;\n pixels[op++] = g;\n pixels[op++] = b;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n var min_code_size = code_stream[p++];\n\n var clear_code = 1 << min_code_size;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n // NOTE: This shares the same name as the encoder, but has a different\n // meaning here. Here this masks each code coming from the code stream.\n var code_mask = (1 << cur_code_size) - 1;\n var cur_shift = 0;\n var cur = 0;\n\n var op = 0; // Output pointer.\n\n var subblock_size = code_stream[p++];\n\n // TODO(deanm): Would using a TypedArray be any faster? At least it would\n // solve the fast mode / backing store uncertainty.\n // var code_table = Array(4096);\n var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n var prev_code = null; // Track code-1.\n\n while (true) {\n // Read up to two bytes, making sure we always 12-bits for max sized code.\n while (cur_shift < 16) {\n if (subblock_size === 0) break; // No more data to be read.\n\n cur |= code_stream[p++] << cur_shift;\n cur_shift += 8;\n\n if (subblock_size === 1) {\n // Never let it get to 0 to hold logic above.\n subblock_size = code_stream[p++]; // Next subblock.\n } else {\n --subblock_size;\n }\n }\n\n // TODO(deanm): We should never really get here, we should have received\n // and EOI.\n if (cur_shift < cur_code_size) break;\n\n var code = cur & code_mask;\n cur >>= cur_code_size;\n cur_shift -= cur_code_size;\n\n // TODO(deanm): Maybe should check that the first code was a clear code,\n // at least this is what you're supposed to do. But actually our encoder\n // now doesn't emit a clear code first anyway.\n if (code === clear_code) {\n // We don't actually have to clear the table. This could be a good idea\n // for greater error checking, but we don't really do any anyway. We\n // will just track it with next_code and overwrite old entries.\n\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_mask = (1 << cur_code_size) - 1;\n\n // Don't update prev_code ?\n prev_code = null;\n continue;\n } else if (code === eoi_code) {\n break;\n }\n\n // We have a similar situation as the decoder, where we want to store\n // variable length entries (code table entries), but we want to do in a\n // faster manner than an array of arrays. The code below stores sort of a\n // linked list within the code table, and then \"chases\" through it to\n // construct the dictionary entries. When a new entry is created, just the\n // last byte is stored, and the rest (prefix) of the entry is only\n // referenced by its table entry. Then the code chases through the\n // prefixes until it reaches a single byte code. We have to chase twice,\n // first to compute the length, and then to actually copy the data to the\n // output (backwards, since we know the length). The alternative would be\n // storing something in an intermediate stack, but that doesn't make any\n // more sense. I implemented an approach where it also stored the length\n // in the code table, although it's a bit tricky because you run out of\n // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n // entries are generally not the long). Even when I created benchmarks for\n // very long table entries the complexity did not seem worth it.\n // The code table stores the prefix entry in 12 bits and then the suffix\n // byte in 8 bits, so each entry is 20 bits.\n\n var chase_code = code < next_code ? code : prev_code;\n\n // Chase what we will output, either {CODE} or {CODE-1}.\n var chase_length = 0;\n var chase = chase_code;\n while (chase > clear_code) {\n chase = code_table[chase] >> 8;\n ++chase_length;\n }\n\n var k = chase;\n\n var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n if (op_end > output_length) {\n console.log(\"Warning, gif stream longer than expected.\");\n return;\n }\n\n // Already have the first byte from the chase, might as well write it fast.\n output[op++] = k;\n\n op += chase_length;\n var b = op; // Track pointer, writing backwards.\n\n if (chase_code !== code)\n // The case of emitting {CODE-1} + k.\n output[op++] = k;\n\n chase = chase_code;\n while (chase_length--) {\n chase = code_table[chase];\n output[--b] = chase & 0xff; // Write backwards.\n chase >>= 8; // Pull down to the prefix code.\n }\n\n if (prev_code !== null && next_code < 4096) {\n code_table[next_code++] = (prev_code << 8) | k;\n // TODO(deanm): Figure out this clearing vs code growth logic better. I\n // have an feeling that it should just happen somewhere else, for now it\n // is awkward between when we grow past the max and then hit a clear code.\n // For now just check if we hit the max 12-bits (then a clear code should\n // follow, also of course encoded in 12-bits).\n if (next_code >= code_mask + 1 && cur_code_size < 12) {\n ++cur_code_size;\n code_mask = (code_mask << 1) | 1;\n }\n }\n\n prev_code = code;\n }\n\n if (op !== output_length) {\n console.log(\"Warning, gif stream shorter than expected.\");\n }\n\n return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n Copyright (c) 2008, Adobe Systems Incorporated\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without \n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the \n documentation and/or other materials provided with the distribution.\n \n * Neither the name of Adobe Systems Incorporated nor the names of its \n contributors may be used to endorse or promote products derived from \n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n var ffloor = Math.floor;\n var YTable = new Array(64);\n var UVTable = new Array(64);\n var fdtbl_Y = new Array(64);\n var fdtbl_UV = new Array(64);\n var YDC_HT;\n var UVDC_HT;\n var YAC_HT;\n var UVAC_HT;\n\n var bitcode = new Array(65535);\n var category = new Array(65535);\n var outputfDCTQuant = new Array(64);\n var DU = new Array(64);\n var byteout = [];\n var bytenew = 0;\n var bytepos = 7;\n\n var YDU = new Array(64);\n var UDU = new Array(64);\n var VDU = new Array(64);\n var clt = new Array(256);\n var RGB_YUV_TABLE = new Array(2048);\n var currentQuality;\n\n var ZigZag = [\n 0,\n 1,\n 5,\n 6,\n 14,\n 15,\n 27,\n 28,\n 2,\n 4,\n 7,\n 13,\n 16,\n 26,\n 29,\n 42,\n 3,\n 8,\n 12,\n 17,\n 25,\n 30,\n 41,\n 43,\n 9,\n 11,\n 18,\n 24,\n 31,\n 40,\n 44,\n 53,\n 10,\n 19,\n 23,\n 32,\n 39,\n 45,\n 52,\n 54,\n 20,\n 22,\n 33,\n 38,\n 46,\n 51,\n 55,\n 60,\n 21,\n 34,\n 37,\n 47,\n 50,\n 56,\n 59,\n 61,\n 35,\n 36,\n 48,\n 49,\n 57,\n 58,\n 62,\n 63\n ];\n\n var std_dc_luminance_nrcodes = [\n 0,\n 0,\n 1,\n 5,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var std_ac_luminance_nrcodes = [\n 0,\n 0,\n 2,\n 1,\n 3,\n 3,\n 2,\n 4,\n 3,\n 5,\n 5,\n 4,\n 4,\n 0,\n 0,\n 1,\n 0x7d\n ];\n var std_ac_luminance_values = [\n 0x01,\n 0x02,\n 0x03,\n 0x00,\n 0x04,\n 0x11,\n 0x05,\n 0x12,\n 0x21,\n 0x31,\n 0x41,\n 0x06,\n 0x13,\n 0x51,\n 0x61,\n 0x07,\n 0x22,\n 0x71,\n 0x14,\n 0x32,\n 0x81,\n 0x91,\n 0xa1,\n 0x08,\n 0x23,\n 0x42,\n 0xb1,\n 0xc1,\n 0x15,\n 0x52,\n 0xd1,\n 0xf0,\n 0x24,\n 0x33,\n 0x62,\n 0x72,\n 0x82,\n 0x09,\n 0x0a,\n 0x16,\n 0x17,\n 0x18,\n 0x19,\n 0x1a,\n 0x25,\n 0x26,\n 0x27,\n 0x28,\n 0x29,\n 0x2a,\n 0x34,\n 0x35,\n 0x36,\n 0x37,\n 0x38,\n 0x39,\n 0x3a,\n 0x43,\n 0x44,\n 0x45,\n 0x46,\n 0x47,\n 0x48,\n 0x49,\n 0x4a,\n 0x53,\n 0x54,\n 0x55,\n 0x56,\n 0x57,\n 0x58,\n 0x59,\n 0x5a,\n 0x63,\n 0x64,\n 0x65,\n 0x66,\n 0x67,\n 0x68,\n 0x69,\n 0x6a,\n 0x73,\n 0x74,\n 0x75,\n 0x76,\n 0x77,\n 0x78,\n 0x79,\n 0x7a,\n 0x83,\n 0x84,\n 0x85,\n 0x86,\n 0x87,\n 0x88,\n 0x89,\n 0x8a,\n 0x92,\n 0x93,\n 0x94,\n 0x95,\n 0x96,\n 0x97,\n 0x98,\n 0x99,\n 0x9a,\n 0xa2,\n 0xa3,\n 0xa4,\n 0xa5,\n 0xa6,\n 0xa7,\n 0xa8,\n 0xa9,\n 0xaa,\n 0xb2,\n 0xb3,\n 0xb4,\n 0xb5,\n 0xb6,\n 0xb7,\n 0xb8,\n 0xb9,\n 0xba,\n 0xc2,\n 0xc3,\n 0xc4,\n 0xc5,\n 0xc6,\n 0xc7,\n 0xc8,\n 0xc9,\n 0xca,\n 0xd2,\n 0xd3,\n 0xd4,\n 0xd5,\n 0xd6,\n 0xd7,\n 0xd8,\n 0xd9,\n 0xda,\n 0xe1,\n 0xe2,\n 0xe3,\n 0xe4,\n 0xe5,\n 0xe6,\n 0xe7,\n 0xe8,\n 0xe9,\n 0xea,\n 0xf1,\n 0xf2,\n 0xf3,\n 0xf4,\n 0xf5,\n 0xf6,\n 0xf7,\n 0xf8,\n 0xf9,\n 0xfa\n ];\n\n var std_dc_chrominance_nrcodes = [\n 0,\n 0,\n 3,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var std_ac_chrominance_nrcodes = [\n 0,\n 0,\n 2,\n 1,\n 2,\n 4,\n 4,\n 3,\n 4,\n 7,\n 5,\n 4,\n 4,\n 0,\n 1,\n 2,\n 0x77\n ];\n var std_ac_chrominance_values = [\n 0x00,\n 0x01,\n 0x02,\n 0x03,\n 0x11,\n 0x04,\n 0x05,\n 0x21,\n 0x31,\n 0x06,\n 0x12,\n 0x41,\n 0x51,\n 0x07,\n 0x61,\n 0x71,\n 0x13,\n 0x22,\n 0x32,\n 0x81,\n 0x08,\n 0x14,\n 0x42,\n 0x91,\n 0xa1,\n 0xb1,\n 0xc1,\n 0x09,\n 0x23,\n 0x33,\n 0x52,\n 0xf0,\n 0x15,\n 0x62,\n 0x72,\n 0xd1,\n 0x0a,\n 0x16,\n 0x24,\n 0x34,\n 0xe1,\n 0x25,\n 0xf1,\n 0x17,\n 0x18,\n 0x19,\n 0x1a,\n 0x26,\n 0x27,\n 0x28,\n 0x29,\n 0x2a,\n 0x35,\n 0x36,\n 0x37,\n 0x38,\n 0x39,\n 0x3a,\n 0x43,\n 0x44,\n 0x45,\n 0x46,\n 0x47,\n 0x48,\n 0x49,\n 0x4a,\n 0x53,\n 0x54,\n 0x55,\n 0x56,\n 0x57,\n 0x58,\n 0x59,\n 0x5a,\n 0x63,\n 0x64,\n 0x65,\n 0x66,\n 0x67,\n 0x68,\n 0x69,\n 0x6a,\n 0x73,\n 0x74,\n 0x75,\n 0x76,\n 0x77,\n 0x78,\n 0x79,\n 0x7a,\n 0x82,\n 0x83,\n 0x84,\n 0x85,\n 0x86,\n 0x87,\n 0x88,\n 0x89,\n 0x8a,\n 0x92,\n 0x93,\n 0x94,\n 0x95,\n 0x96,\n 0x97,\n 0x98,\n 0x99,\n 0x9a,\n 0xa2,\n 0xa3,\n 0xa4,\n 0xa5,\n 0xa6,\n 0xa7,\n 0xa8,\n 0xa9,\n 0xaa,\n 0xb2,\n 0xb3,\n 0xb4,\n 0xb5,\n 0xb6,\n 0xb7,\n 0xb8,\n 0xb9,\n 0xba,\n 0xc2,\n 0xc3,\n 0xc4,\n 0xc5,\n 0xc6,\n 0xc7,\n 0xc8,\n 0xc9,\n 0xca,\n 0xd2,\n 0xd3,\n 0xd4,\n 0xd5,\n 0xd6,\n 0xd7,\n 0xd8,\n 0xd9,\n 0xda,\n 0xe2,\n 0xe3,\n 0xe4,\n 0xe5,\n 0xe6,\n 0xe7,\n 0xe8,\n 0xe9,\n 0xea,\n 0xf2,\n 0xf3,\n 0xf4,\n 0xf5,\n 0xf6,\n 0xf7,\n 0xf8,\n 0xf9,\n 0xfa\n ];\n\n function initQuantTables(sf) {\n var YQT = [\n 16,\n 11,\n 10,\n 16,\n 24,\n 40,\n 51,\n 61,\n 12,\n 12,\n 14,\n 19,\n 26,\n 58,\n 60,\n 55,\n 14,\n 13,\n 16,\n 24,\n 40,\n 57,\n 69,\n 56,\n 14,\n 17,\n 22,\n 29,\n 51,\n 87,\n 80,\n 62,\n 18,\n 22,\n 37,\n 56,\n 68,\n 109,\n 103,\n 77,\n 24,\n 35,\n 55,\n 64,\n 81,\n 104,\n 113,\n 92,\n 49,\n 64,\n 78,\n 87,\n 103,\n 121,\n 120,\n 101,\n 72,\n 92,\n 95,\n 98,\n 112,\n 100,\n 103,\n 99\n ];\n\n for (var i = 0; i < 64; i++) {\n var t = ffloor((YQT[i] * sf + 50) / 100);\n t = Math.min(Math.max(t, 1), 255);\n YTable[ZigZag[i]] = t;\n }\n var UVQT = [\n 17,\n 18,\n 24,\n 47,\n 99,\n 99,\n 99,\n 99,\n 18,\n 21,\n 26,\n 66,\n 99,\n 99,\n 99,\n 99,\n 24,\n 26,\n 56,\n 99,\n 99,\n 99,\n 99,\n 99,\n 47,\n 66,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99\n ];\n for (var j = 0; j < 64; j++) {\n var u = ffloor((UVQT[j] * sf + 50) / 100);\n u = Math.min(Math.max(u, 1), 255);\n UVTable[ZigZag[j]] = u;\n }\n var aasf = [\n 1.0,\n 1.387039845,\n 1.306562965,\n 1.175875602,\n 1.0,\n 0.785694958,\n 0.5411961,\n 0.275899379\n ];\n var k = 0;\n for (var row = 0; row < 8; row++) {\n for (var col = 0; col < 8; col++) {\n fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n k++;\n }\n }\n }\n\n function computeHuffmanTbl(nrcodes, std_table) {\n var codevalue = 0;\n var pos_in_table = 0;\n var HT = new Array();\n for (var k = 1; k <= 16; k++) {\n for (var j = 1; j <= nrcodes[k]; j++) {\n HT[std_table[pos_in_table]] = [];\n HT[std_table[pos_in_table]][0] = codevalue;\n HT[std_table[pos_in_table]][1] = k;\n pos_in_table++;\n codevalue++;\n }\n codevalue *= 2;\n }\n return HT;\n }\n\n function initHuffmanTbl() {\n YDC_HT = computeHuffmanTbl(\n std_dc_luminance_nrcodes,\n std_dc_luminance_values\n );\n UVDC_HT = computeHuffmanTbl(\n std_dc_chrominance_nrcodes,\n std_dc_chrominance_values\n );\n YAC_HT = computeHuffmanTbl(\n std_ac_luminance_nrcodes,\n std_ac_luminance_values\n );\n UVAC_HT = computeHuffmanTbl(\n std_ac_chrominance_nrcodes,\n std_ac_chrominance_values\n );\n }\n\n function initCategoryNumber() {\n var nrlower = 1;\n var nrupper = 2;\n for (var cat = 1; cat <= 15; cat++) {\n //Positive numbers\n for (var nr = nrlower; nr < nrupper; nr++) {\n category[32767 + nr] = cat;\n bitcode[32767 + nr] = [];\n bitcode[32767 + nr][1] = cat;\n bitcode[32767 + nr][0] = nr;\n }\n //Negative numbers\n for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n category[32767 + nrneg] = cat;\n bitcode[32767 + nrneg] = [];\n bitcode[32767 + nrneg][1] = cat;\n bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n }\n nrlower <<= 1;\n nrupper <<= 1;\n }\n }\n\n function initRGBYUVTable() {\n for (var i = 0; i < 256; i++) {\n RGB_YUV_TABLE[i] = 19595 * i;\n RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n }\n }\n\n // IO functions\n function writeBits(bs) {\n var value = bs[0];\n var posval = bs[1] - 1;\n while (posval >= 0) {\n if (value & (1 << posval)) {\n bytenew |= 1 << bytepos;\n }\n posval--;\n bytepos--;\n if (bytepos < 0) {\n if (bytenew == 0xff) {\n writeByte(0xff);\n writeByte(0);\n } else {\n writeByte(bytenew);\n }\n bytepos = 7;\n bytenew = 0;\n }\n }\n }\n\n function writeByte(value) {\n //byteout.push(clt[value]); // write char directly instead of converting later\n byteout.push(value);\n }\n\n function writeWord(value) {\n writeByte((value >> 8) & 0xff);\n writeByte(value & 0xff);\n }\n\n // DCT & quantization core\n function fDCTQuant(data, fdtbl) {\n var d0, d1, d2, d3, d4, d5, d6, d7;\n /* Pass 1: process rows. */\n var dataOff = 0;\n var i;\n var I8 = 8;\n var I64 = 64;\n for (i = 0; i < I8; ++i) {\n d0 = data[dataOff];\n d1 = data[dataOff + 1];\n d2 = data[dataOff + 2];\n d3 = data[dataOff + 3];\n d4 = data[dataOff + 4];\n d5 = data[dataOff + 5];\n d6 = data[dataOff + 6];\n d7 = data[dataOff + 7];\n\n var tmp0 = d0 + d7;\n var tmp7 = d0 - d7;\n var tmp1 = d1 + d6;\n var tmp6 = d1 - d6;\n var tmp2 = d2 + d5;\n var tmp5 = d2 - d5;\n var tmp3 = d3 + d4;\n var tmp4 = d3 - d4;\n\n /* Even part */\n var tmp10 = tmp0 + tmp3; /* phase 2 */\n var tmp13 = tmp0 - tmp3;\n var tmp11 = tmp1 + tmp2;\n var tmp12 = tmp1 - tmp2;\n\n data[dataOff] = tmp10 + tmp11; /* phase 3 */\n data[dataOff + 4] = tmp10 - tmp11;\n\n var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n data[dataOff + 6] = tmp13 - z1;\n\n /* Odd part */\n tmp10 = tmp4 + tmp5; /* phase 2 */\n tmp11 = tmp5 + tmp6;\n tmp12 = tmp6 + tmp7;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n var z3 = tmp11 * 0.707106781; /* c4 */\n\n var z11 = tmp7 + z3; /* phase 5 */\n var z13 = tmp7 - z3;\n\n data[dataOff + 5] = z13 + z2; /* phase 6 */\n data[dataOff + 3] = z13 - z2;\n data[dataOff + 1] = z11 + z4;\n data[dataOff + 7] = z11 - z4;\n\n dataOff += 8; /* advance pointer to next row */\n }\n\n /* Pass 2: process columns. */\n dataOff = 0;\n for (i = 0; i < I8; ++i) {\n d0 = data[dataOff];\n d1 = data[dataOff + 8];\n d2 = data[dataOff + 16];\n d3 = data[dataOff + 24];\n d4 = data[dataOff + 32];\n d5 = data[dataOff + 40];\n d6 = data[dataOff + 48];\n d7 = data[dataOff + 56];\n\n var tmp0p2 = d0 + d7;\n var tmp7p2 = d0 - d7;\n var tmp1p2 = d1 + d6;\n var tmp6p2 = d1 - d6;\n var tmp2p2 = d2 + d5;\n var tmp5p2 = d2 - d5;\n var tmp3p2 = d3 + d4;\n var tmp4p2 = d3 - d4;\n\n /* Even part */\n var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n var tmp13p2 = tmp0p2 - tmp3p2;\n var tmp11p2 = tmp1p2 + tmp2p2;\n var tmp12p2 = tmp1p2 - tmp2p2;\n\n data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n data[dataOff + 48] = tmp13p2 - z1p2;\n\n /* Odd part */\n tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n tmp11p2 = tmp5p2 + tmp6p2;\n tmp12p2 = tmp6p2 + tmp7p2;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n var z13p2 = tmp7p2 - z3p2;\n\n data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n data[dataOff + 24] = z13p2 - z2p2;\n data[dataOff + 8] = z11p2 + z4p2;\n data[dataOff + 56] = z11p2 - z4p2;\n\n dataOff++; /* advance pointer to next column */\n }\n\n // Quantize/descale the coefficients\n var fDCTQuant;\n for (i = 0; i < I64; ++i) {\n // Apply the quantization and scaling factor & Round to nearest integer\n fDCTQuant = data[i] * fdtbl[i];\n outputfDCTQuant[i] =\n fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n //outputfDCTQuant[i] = fround(fDCTQuant);\n }\n return outputfDCTQuant;\n }\n\n function writeAPP0() {\n writeWord(0xffe0); // marker\n writeWord(16); // length\n writeByte(0x4a); // J\n writeByte(0x46); // F\n writeByte(0x49); // I\n writeByte(0x46); // F\n writeByte(0); // = \"JFIF\",'\\0'\n writeByte(1); // versionhi\n writeByte(1); // versionlo\n writeByte(0); // xyunits\n writeWord(1); // xdensity\n writeWord(1); // ydensity\n writeByte(0); // thumbnwidth\n writeByte(0); // thumbnheight\n }\n\n function writeSOF0(width, height) {\n writeWord(0xffc0); // marker\n writeWord(17); // length, truecolor YUV JPG\n writeByte(8); // precision\n writeWord(height);\n writeWord(width);\n writeByte(3); // nrofcomponents\n writeByte(1); // IdY\n writeByte(0x11); // HVY\n writeByte(0); // QTY\n writeByte(2); // IdU\n writeByte(0x11); // HVU\n writeByte(1); // QTU\n writeByte(3); // IdV\n writeByte(0x11); // HVV\n writeByte(1); // QTV\n }\n\n function writeDQT() {\n writeWord(0xffdb); // marker\n writeWord(132); // length\n writeByte(0);\n for (var i = 0; i < 64; i++) {\n writeByte(YTable[i]);\n }\n writeByte(1);\n for (var j = 0; j < 64; j++) {\n writeByte(UVTable[j]);\n }\n }\n\n function writeDHT() {\n writeWord(0xffc4); // marker\n writeWord(0x01a2); // length\n\n writeByte(0); // HTYDCinfo\n for (var i = 0; i < 16; i++) {\n writeByte(std_dc_luminance_nrcodes[i + 1]);\n }\n for (var j = 0; j <= 11; j++) {\n writeByte(std_dc_luminance_values[j]);\n }\n\n writeByte(0x10); // HTYACinfo\n for (var k = 0; k < 16; k++) {\n writeByte(std_ac_luminance_nrcodes[k + 1]);\n }\n for (var l = 0; l <= 161; l++) {\n writeByte(std_ac_luminance_values[l]);\n }\n\n writeByte(1); // HTUDCinfo\n for (var m = 0; m < 16; m++) {\n writeByte(std_dc_chrominance_nrcodes[m + 1]);\n }\n for (var n = 0; n <= 11; n++) {\n writeByte(std_dc_chrominance_values[n]);\n }\n\n writeByte(0x11); // HTUACinfo\n for (var o = 0; o < 16; o++) {\n writeByte(std_ac_chrominance_nrcodes[o + 1]);\n }\n for (var p = 0; p <= 161; p++) {\n writeByte(std_ac_chrominance_values[p]);\n }\n }\n\n function writeSOS() {\n writeWord(0xffda); // marker\n writeWord(12); // length\n writeByte(3); // nrofcomponents\n writeByte(1); // IdY\n writeByte(0); // HTY\n writeByte(2); // IdU\n writeByte(0x11); // HTU\n writeByte(3); // IdV\n writeByte(0x11); // HTV\n writeByte(0); // Ss\n writeByte(0x3f); // Se\n writeByte(0); // Bf\n }\n\n function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n var EOB = HTAC[0x00];\n var M16zeroes = HTAC[0xf0];\n var pos;\n var I16 = 16;\n var I63 = 63;\n var I64 = 64;\n var DU_DCT = fDCTQuant(CDU, fdtbl);\n //ZigZag reorder\n for (var j = 0; j < I64; ++j) {\n DU[ZigZag[j]] = DU_DCT[j];\n }\n var Diff = DU[0] - DC;\n DC = DU[0];\n //Encode DC\n if (Diff == 0) {\n writeBits(HTDC[0]); // Diff might be 0\n } else {\n pos = 32767 + Diff;\n writeBits(HTDC[category[pos]]);\n writeBits(bitcode[pos]);\n }\n //Encode ACs\n var end0pos = 63; // was const... which is crazy\n while (end0pos > 0 && DU[end0pos] == 0) {\n end0pos--;\n }\n //end0pos = first element in reverse order !=0\n if (end0pos == 0) {\n writeBits(EOB);\n return DC;\n }\n var i = 1;\n var lng;\n while (i <= end0pos) {\n var startpos = i;\n while (DU[i] == 0 && i <= end0pos) {\n ++i;\n }\n var nrzeroes = i - startpos;\n if (nrzeroes >= I16) {\n lng = nrzeroes >> 4;\n for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n writeBits(M16zeroes);\n nrzeroes = nrzeroes & 0xf;\n }\n pos = 32767 + DU[i];\n writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n writeBits(bitcode[pos]);\n i++;\n }\n if (end0pos != I63) {\n writeBits(EOB);\n }\n return DC;\n }\n\n function initCharLookupTable() {\n var sfcc = String.fromCharCode;\n for (var i = 0; i < 256; i++) {\n ///// ACHTUNG // 255\n clt[i] = sfcc(i);\n }\n }\n\n this.encode = function(\n image,\n quality // image data object\n ) {\n if (quality) setQuality(quality);\n\n // Initialize bit writer\n byteout = new Array();\n bytenew = 0;\n bytepos = 7;\n\n // Add JPEG headers\n writeWord(0xffd8); // SOI\n writeAPP0();\n writeDQT();\n writeSOF0(image.width, image.height);\n writeDHT();\n writeSOS();\n\n // Encode 8x8 macroblocks\n var DCY = 0;\n var DCU = 0;\n var DCV = 0;\n\n bytenew = 0;\n bytepos = 7;\n\n this.encode.displayName = \"_encode_\";\n\n var imageData = image.data;\n var width = image.width;\n var height = image.height;\n\n var quadWidth = width * 4;\n\n var x,\n y = 0;\n var r, g, b;\n var start, p, col, row, pos;\n while (y < height) {\n x = 0;\n while (x < quadWidth) {\n start = quadWidth * y + x;\n col = -1;\n row = 0;\n\n for (pos = 0; pos < 64; pos++) {\n row = pos >> 3; // /8\n col = (pos & 7) * 4; // %8\n p = start + row * quadWidth + col;\n\n if (y + row >= height) {\n // padding bottom\n p -= quadWidth * (y + 1 + row - height);\n }\n\n if (x + col >= quadWidth) {\n // padding right\n p -= x + col - quadWidth + 4;\n }\n\n r = imageData[p++];\n g = imageData[p++];\n b = imageData[p++];\n\n /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n // use lookup table (slightly faster)\n YDU[pos] =\n ((RGB_YUV_TABLE[r] +\n RGB_YUV_TABLE[(g + 256) >> 0] +\n RGB_YUV_TABLE[(b + 512) >> 0]) >>\n 16) -\n 128;\n UDU[pos] =\n ((RGB_YUV_TABLE[(r + 768) >> 0] +\n RGB_YUV_TABLE[(g + 1024) >> 0] +\n RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n 16) -\n 128;\n VDU[pos] =\n ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n RGB_YUV_TABLE[(g + 1536) >> 0] +\n RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n 16) -\n 128;\n }\n\n DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n x += 32;\n }\n y += 8;\n }\n\n ////////////////////////////////////////////////////////////////\n\n // Do the bit alignment of the EOI marker\n if (bytepos >= 0) {\n var fillbits = [];\n fillbits[1] = bytepos + 1;\n fillbits[0] = (1 << (bytepos + 1)) - 1;\n writeBits(fillbits);\n }\n\n writeWord(0xffd9); //EOI\n\n return new Uint8Array(byteout);\n };\n\n function setQuality(quality) {\n quality = Math.min(Math.max(quality, 1), 100);\n\n if (currentQuality == quality) return; // don't recalc if unchanged\n\n var sf =\n quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n initQuantTables(sf);\n currentQuality = quality;\n //console.log('Quality set to: '+quality +'%');\n }\n\n function init() {\n quality = quality || 50;\n // Create tables\n initCharLookupTable();\n initHuffmanTbl();\n initCategoryNumber();\n initRGBYUVTable();\n\n setQuality(quality);\n }\n init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n this.pos = 0;\n this.buffer = buffer;\n this.datav = new DataView(buffer.buffer);\n this.is_with_alpha = !!is_with_alpha;\n this.bottom_up = true;\n this.flag =\n String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n this.pos += 2;\n if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n throw new Error(\"Invalid BMP File\");\n this.parseHeader();\n this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n this.fileSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.reserved = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.offset = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.headerSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.width = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.height = this.datav.getInt32(this.pos, true);\n this.pos += 4;\n this.planes = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n this.bitPP = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n this.compress = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.rawSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.hr = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.vr = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.colors = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.importantColors = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n\n if (this.bitPP === 16 && this.is_with_alpha) {\n this.bitPP = 15;\n }\n if (this.bitPP < 15) {\n var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n this.palette = new Array(len);\n for (var i = 0; i < len; i++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var quad = this.datav.getUint8(this.pos++, true);\n this.palette[i] = {\n red: red,\n green: green,\n blue: blue,\n quad: quad\n };\n }\n }\n if (this.height < 0) {\n this.height *= -1;\n this.bottom_up = false;\n }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n this.pos = this.offset;\n try {\n var bitn = \"bit\" + this.bitPP;\n var len = this.width * this.height * 4;\n this.data = new Uint8Array(len);\n\n this[bitn]();\n } catch (e) {\n console.log(\"bit decode error:\" + e);\n }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n var xlen = Math.ceil(this.width / 8);\n var mode = xlen % 4;\n var y;\n for (y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < xlen; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 8 * 4;\n for (var i = 0; i < 8; i++) {\n if (x * 8 + i < this.width) {\n var rgb = this.palette[(b >> (7 - i)) & 0x1];\n this.data[location + i * 4] = rgb.blue;\n this.data[location + i * 4 + 1] = rgb.green;\n this.data[location + i * 4 + 2] = rgb.red;\n this.data[location + i * 4 + 3] = 0xff;\n } else {\n break;\n }\n }\n }\n\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n var xlen = Math.ceil(this.width / 2);\n var mode = xlen % 4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < xlen; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 2 * 4;\n\n var before = b >> 4;\n var after = b & 0x0f;\n\n var rgb = this.palette[before];\n this.data[location] = rgb.blue;\n this.data[location + 1] = rgb.green;\n this.data[location + 2] = rgb.red;\n this.data[location + 3] = 0xff;\n\n if (x * 2 + 1 >= this.width) break;\n\n rgb = this.palette[after];\n this.data[location + 4] = rgb.blue;\n this.data[location + 4 + 1] = rgb.green;\n this.data[location + 4 + 2] = rgb.red;\n this.data[location + 4 + 3] = 0xff;\n }\n\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n var mode = this.width % 4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n if (b < this.palette.length) {\n var rgb = this.palette[b];\n this.data[location] = rgb.red;\n this.data[location + 1] = rgb.green;\n this.data[location + 2] = rgb.blue;\n this.data[location + 3] = 0xff;\n } else {\n this.data[location] = 0xff;\n this.data[location + 1] = 0xff;\n this.data[location + 2] = 0xff;\n this.data[location + 3] = 0xff;\n }\n }\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n var dif_w = this.width % 3;\n var _11111 = parseInt(\"11111\", 2),\n _1_5 = _11111;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var B = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n var blue = (((B & _1_5) / _1_5) * 255) | 0;\n var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n var alpha = B >> 15 ? 0xff : 0x00;\n\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n var dif_w = this.width % 3;\n var _11111 = parseInt(\"11111\", 2),\n _1_5 = _11111;\n var _111111 = parseInt(\"111111\", 2),\n _1_6 = _111111;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var B = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n var alpha = 0xff;\n var blue = (((B & _1_5) / _1_5) * 255) | 0;\n var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n var red = (((B >> 11) / _1_5) * 255) | 0;\n\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n //when height > 0\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = 0xff;\n }\n //skip extra bytes\n this.pos += this.width % 4;\n }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n //when height > 0\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var alpha = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n //this.pos += (this.width % 4);\n }\n};\n\nBmpDecoder.prototype.getData = function() {\n return this.data;\n};\n\nexport { BmpDecoder };\n","function WebPDecoder(imageData) {\n /** @license\n * Copyright 2011 Google Inc.\n *\n * This code is licensed under the same terms as WebM:\n * Software License Agreement: http://www.webmproject.org/license/software/\n * Additional IP Rights Grant: http://www.webmproject.org/license/additional/\n * -----------------------------------------------------------------------------\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * -----------------------------------------------------------------------------\n *\n * Copyright 2011-2017 Dominik Homberger\n * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n *\n * Author: Dominik Homberger (dominik.homberger@gmail.com)\n */\n\n var self = this;\n var UpsampleRgbLinePair,\n UpsampleBgrLinePair,\n UpsampleRgbaLinePair,\n UpsampleBgraLinePair,\n UpsampleArgbLinePair,\n UpsampleArgbLinePair,\n UpsampleRgba4444LinePair,\n UpsampleRgb565LinePair;\n\n function x(F) {\n if (!F) throw Error(\"assert :P\");\n }\n function fa(F, L, J) {\n for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n return !1;\n }\n function I(F, L, J, H, Z) {\n for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n }\n function M(F, L, J, H) {\n for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n }\n function V(F) {\n return new Int32Array(F);\n }\n function wa(F, L) {\n for (var J = [], H = 0; H < F; H++) J.push(new L());\n return J;\n }\n function wb() {\n function F(J, H, Z) {\n for (var O = Z[H], L = 0; L < O; L++) {\n J.push(Z.length > H + 1 ? [] : 0);\n if (Z.length < H + 1) break;\n F(J[L], H + 1, Z);\n }\n }\n var L = [];\n F(L, 0, [3, 11]);\n return L;\n }\n function Ed(F, L) {\n function J(H, O, F) {\n for (var Z = F[O], ma = 0; ma < Z; ma++) {\n H.push(F.length > O + 1 ? [] : new L());\n if (F.length < O + 1) break;\n J(H[ma], O + 1, F);\n }\n }\n var H = [];\n J(H, 0, F);\n return H;\n }\n var _WebPDecoder = function() {\n var self = this;\n function F() {\n V(55);\n }\n function L(a, b) {\n for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n return c ? (a & (c - 1)) + c : a;\n }\n function J(a, b, c, d, e) {\n x(!(d % c));\n do (d -= c), (a[b + d] = e);\n while (0 < d);\n }\n function H(a, b, c, d, e, f) {\n var g = b,\n h = 1 << c,\n k,\n l,\n m = V(16),\n n = V(16);\n x(0 != e);\n x(null != d);\n x(null != a);\n x(0 < c);\n for (l = 0; l < e; ++l) {\n if (15 < d[l]) return 0;\n ++m[d[l]];\n }\n if (m[0] == e) return 0;\n n[1] = 0;\n for (k = 1; 15 > k; ++k) {\n if (m[k] > 1 << k) return 0;\n n[k + 1] = n[k] + m[k];\n }\n for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n if (1 == n[15])\n return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n var r = -1,\n q = h - 1,\n t = 0,\n v = 1,\n p = 1,\n u,\n w = 1 << c;\n l = 0;\n k = 1;\n for (e = 2; k <= c; ++k, e <<= 1) {\n p <<= 1;\n v += p;\n p -= m[k];\n if (0 > p) return 0;\n for (; 0 < m[k]; --m[k])\n (d = new O()),\n (d.g = k),\n (d.value = f[l++]),\n J(a, g + t, e, w, d),\n (t = L(t, k));\n }\n k = c + 1;\n for (e = 2; 15 >= k; ++k, e <<= 1) {\n p <<= 1;\n v += p;\n p -= m[k];\n if (0 > p) return 0;\n for (; 0 < m[k]; --m[k]) {\n d = new O();\n if ((t & q) != r) {\n g += w;\n r = k;\n for (u = 1 << (r - c); 15 > r; ) {\n u -= m[r];\n if (0 >= u) break;\n ++r;\n u <<= 1;\n }\n u = r - c;\n w = 1 << u;\n h += w;\n r = t & q;\n a[b + r].g = u + c;\n a[b + r].value = g - b - r;\n }\n d.g = k - c;\n d.value = f[l++];\n J(a, g + (t >> c), e, w, d);\n t = L(t, k);\n }\n }\n return v != 2 * n[15] - 1 ? 0 : h;\n }\n function Z(a, b, c, d, e) {\n x(2328 >= e);\n if (512 >= e) var f = V(512);\n else if (((f = V(e)), null == f)) return 0;\n return H(a, b, c, d, e, f);\n }\n function O() {\n this.value = this.g = 0;\n }\n function Fd() {\n this.value = this.g = 0;\n }\n function Ub() {\n this.G = wa(5, O);\n this.H = V(5);\n this.jc = this.Qb = this.qb = this.nd = 0;\n this.pd = wa(xb, Fd);\n }\n function ma(a, b, c, d) {\n x(null != a);\n x(null != b);\n x(2147483648 > d);\n a.Ca = 254;\n a.I = 0;\n a.b = -8;\n a.Ka = 0;\n a.oa = b;\n a.pa = c;\n a.Jd = b;\n a.Yc = c + d;\n a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n Qa(a);\n }\n function na(a, b) {\n for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n return c;\n }\n function ca(a, b) {\n var c = na(a, b);\n return G(a) ? -c : c;\n }\n function cb(a, b, c, d) {\n var e,\n f = 0;\n x(null != a);\n x(null != b);\n x(4294967288 > d);\n a.Sb = d;\n a.Ra = 0;\n a.u = 0;\n a.h = 0;\n 4 < d && (d = 4);\n for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n a.Ra = f;\n a.bb = d;\n a.oa = b;\n a.pa = c;\n }\n function Vb(a) {\n for (; 8 <= a.u && a.bb < a.Sb; )\n (a.Ra >>>= 8),\n (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n ++a.bb,\n (a.u -= 8);\n db(a) && ((a.h = 1), (a.u = 0));\n }\n function D(a, b) {\n x(0 <= b);\n if (!a.h && b <= Gd) {\n var c = pb(a) & Hd[b];\n a.u += b;\n Vb(a);\n return c;\n }\n a.h = 1;\n return (a.u = 0);\n }\n function Wb() {\n this.b = this.Ca = this.I = 0;\n this.oa = [];\n this.pa = 0;\n this.Jd = [];\n this.Yc = 0;\n this.Zc = [];\n this.Ka = 0;\n }\n function Ra() {\n this.Ra = 0;\n this.oa = [];\n this.h = this.u = this.bb = this.Sb = this.pa = 0;\n }\n function pb(a) {\n return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n }\n function db(a) {\n x(a.bb <= a.Sb);\n return a.h || (a.bb == a.Sb && a.u > ob);\n }\n function qb(a, b) {\n a.u = b;\n a.h = db(a);\n }\n function Sa(a) {\n a.u >= Xb && (x(a.u >= Xb), Vb(a));\n }\n function Qa(a) {\n x(null != a && null != a.oa);\n a.pa < a.Zc\n ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n : (x(null != a && null != a.oa),\n a.pa < a.Yc\n ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n : a.Ka\n ? (a.b = 0)\n : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n }\n function G(a) {\n return na(a, 1);\n }\n function K(a, b) {\n var c = a.Ca;\n 0 > a.b && Qa(a);\n var d = a.b,\n e = (c * b) >>> 8,\n f = (a.I >>> d > e) + 0;\n f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n d = c;\n for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n d = 7 ^ (e + Id[d]);\n a.b -= d;\n a.Ca = (c << d) - 1;\n return f;\n }\n function ra(a, b, c) {\n a[b + 0] = (c >> 24) & 255;\n a[b + 1] = (c >> 16) & 255;\n a[b + 2] = (c >> 8) & 255;\n a[b + 3] = (c >> 0) & 255;\n }\n function Ta(a, b) {\n return (a[b + 0] << 0) | (a[b + 1] << 8);\n }\n function Yb(a, b) {\n return Ta(a, b) | (a[b + 2] << 16);\n }\n function Ha(a, b) {\n return Ta(a, b) | (Ta(a, b + 2) << 16);\n }\n function Zb(a, b) {\n var c = 1 << b;\n x(null != a);\n x(0 < b);\n a.X = V(c);\n if (null == a.X) return 0;\n a.Mb = 32 - b;\n a.Xa = b;\n return 1;\n }\n function $b(a, b) {\n x(null != a);\n x(null != b);\n x(a.Xa == b.Xa);\n I(b.X, 0, a.X, 0, 1 << b.Xa);\n }\n function ac() {\n this.X = [];\n this.Xa = this.Mb = 0;\n }\n function bc(a, b, c, d) {\n x(null != c);\n x(null != d);\n var e = c[0],\n f = d[0];\n 0 == e && (e = (a * f + b / 2) / b);\n 0 == f && (f = (b * e + a / 2) / a);\n if (0 >= e || 0 >= f) return 0;\n c[0] = e;\n d[0] = f;\n return 1;\n }\n function xa(a, b) {\n return (a + (1 << b) - 1) >>> b;\n }\n function yb(a, b) {\n return (\n (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n 0\n );\n }\n function X(a, b) {\n self[b] = function(b, d, e, f, g, h, k) {\n var c;\n for (c = 0; c < g; ++c) {\n var m = self[a](h[k + c - 1], e, f + c);\n h[k + c] = yb(b[d + c], m);\n }\n };\n }\n function Jd() {\n this.ud = this.hd = this.jd = 0;\n }\n function aa(a, b) {\n return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n }\n function sa(a) {\n if (0 <= a && 256 > a) return a;\n if (0 > a) return 0;\n if (255 < a) return 255;\n }\n function eb(a, b) {\n return sa(a + ((a - b + 0.5) >> 1));\n }\n function Ia(a, b, c) {\n return Math.abs(b - c) - Math.abs(a - c);\n }\n function cc(a, b, c, d, e, f, g) {\n d = f[g - 1];\n for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n }\n function Kd(a, b, c, d, e) {\n var f;\n for (f = 0; f < c; ++f) {\n var g = a[b + f],\n h = (g >> 8) & 255,\n k = g & 16711935,\n k = k + ((h << 16) + h),\n k = k & 16711935;\n d[e + f] = ((g & 4278255360) + k) >>> 0;\n }\n }\n function dc(a, b) {\n b.jd = (a >> 0) & 255;\n b.hd = (a >> 8) & 255;\n b.ud = (a >> 16) & 255;\n }\n function Ld(a, b, c, d, e, f) {\n var g;\n for (g = 0; g < d; ++g) {\n var h = b[c + g],\n k = h >>> 8,\n l = h >>> 16,\n m = h,\n l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n l = l & 255,\n m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n m = m & 255;\n e[f + g] = (h & 4278255360) + (l << 16) + m;\n }\n }\n function ec(a, b, c, d, e) {\n self[b] = function(a, b, c, k, l, m, n, r, q) {\n for (k = n; k < r; ++k)\n for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n };\n self[a] = function(a, b, h, k, l, m, n) {\n var f = 8 >> a.b,\n g = a.Ea,\n t = a.K[0],\n v = a.w;\n if (8 > f)\n for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n var p = 0,\n u;\n for (u = 0; u < g; ++u)\n u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n }\n else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n };\n }\n function Md(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 16) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 0) & 255;\n }\n }\n function Nd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 16) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 0) & 255;\n d[e++] = (f >> 24) & 255;\n }\n }\n function Od(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++],\n g = ((f >> 16) & 240) | ((f >> 12) & 15),\n f = ((f >> 0) & 240) | ((f >> 28) & 15);\n d[e++] = g;\n d[e++] = f;\n }\n }\n function Pd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++],\n g = ((f >> 16) & 248) | ((f >> 13) & 7),\n f = ((f >> 5) & 224) | ((f >> 3) & 31);\n d[e++] = g;\n d[e++] = f;\n }\n }\n function Qd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 0) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 16) & 255;\n }\n }\n function fb(a, b, c, d, e, f) {\n if (0 == f)\n for (c = b + c; b < c; )\n (f = a[b++]),\n ra(\n d,\n ((f[0] >> 24) |\n ((f[1] >> 8) & 65280) |\n ((f[2] << 8) & 16711680) |\n (f[3] << 24)) >>>\n 0\n ),\n (e += 32);\n else I(d, e, a, b, c);\n }\n function gb(a, b) {\n self[b][0] = self[a + \"0\"];\n self[b][1] = self[a + \"1\"];\n self[b][2] = self[a + \"2\"];\n self[b][3] = self[a + \"3\"];\n self[b][4] = self[a + \"4\"];\n self[b][5] = self[a + \"5\"];\n self[b][6] = self[a + \"6\"];\n self[b][7] = self[a + \"7\"];\n self[b][8] = self[a + \"8\"];\n self[b][9] = self[a + \"9\"];\n self[b][10] = self[a + \"10\"];\n self[b][11] = self[a + \"11\"];\n self[b][12] = self[a + \"12\"];\n self[b][13] = self[a + \"13\"];\n self[b][14] = self[a + \"0\"];\n self[b][15] = self[a + \"0\"];\n }\n function hb(a) {\n return a == zb || a == Ab || a == Ja || a == Bb;\n }\n function Rd() {\n this.eb = [];\n this.size = this.A = this.fb = 0;\n }\n function Sd() {\n this.y = [];\n this.f = [];\n this.ea = [];\n this.F = [];\n this.Tc = this.Ed = this.Cd = this.Fd = this.lb = this.Db = this.Ab = this.fa = this.J = this.W = this.N = this.O = 0;\n }\n function Cb() {\n this.Rd = this.height = this.width = this.S = 0;\n this.f = {};\n this.f.RGBA = new Rd();\n this.f.kb = new Sd();\n this.sd = null;\n }\n function Td() {\n this.width = [0];\n this.height = [0];\n this.Pd = [0];\n this.Qd = [0];\n this.format = [0];\n }\n function Ud() {\n this.Id = this.fd = this.Md = this.hb = this.ib = this.da = this.bd = this.cd = this.j = this.v = this.Da = this.Sd = this.ob = 0;\n }\n function Vd(a) {\n alert(\"todo:WebPSamplerProcessPlane\");\n return a.T;\n }\n function Wd(a, b) {\n var c = a.T,\n d = b.ba.f.RGBA,\n e = d.eb,\n f = d.fb + a.ka * d.A,\n g = P[b.ba.S],\n h = a.y,\n k = a.O,\n l = a.f,\n m = a.N,\n n = a.ea,\n r = a.W,\n q = b.cc,\n t = b.dc,\n v = b.Mc,\n p = b.Nc,\n u = a.ka,\n w = a.ka + a.T,\n y = a.U,\n A = (y + 1) >> 1;\n 0 == u\n ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n ++c);\n for (; u + 2 < w; u += 2)\n (q = l),\n (t = m),\n (v = n),\n (p = r),\n (m += a.Rc),\n (r += a.Rc),\n (f += 2 * d.A),\n (k += 2 * a.fa),\n g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n k += a.fa;\n a.j + w < a.o\n ? (I(b.ec, b.fc, h, k, y),\n I(b.cc, b.dc, l, m, A),\n I(b.Mc, b.Nc, n, r, A),\n c--)\n : w & 1 ||\n g(\n h,\n k,\n null,\n null,\n l,\n m,\n n,\n r,\n l,\n m,\n n,\n r,\n e,\n f + d.A,\n null,\n null,\n y\n );\n return c;\n }\n function Xd(a, b, c) {\n var d = a.F,\n e = [a.J];\n if (null != d) {\n var f = a.U,\n g = b.ba.S,\n h = g == ya || g == Ja;\n b = b.ba.f.RGBA;\n var k = [0],\n l = a.ka;\n k[0] = a.T;\n a.Kb &&\n (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n var m = b.eb,\n l = b.fb + l * b.A;\n a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n x(c == k);\n a && hb(g) && za(m, l, h, f, k, b.A);\n }\n return 0;\n }\n function gc(a) {\n var b = a.ma,\n c = b.ba.S,\n d = 11 > c,\n e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n b.memory = null;\n b.Ib = null;\n b.Jb = null;\n b.Nd = null;\n if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n e && hb(c) && ic();\n if (a.da) alert(\"todo:use_scaling\");\n else {\n if (d) {\n if (((b.Ib = Vd), a.Kb)) {\n c = (a.U + 1) >> 1;\n b.memory = V(a.U + 2 * c);\n if (null == b.memory) return 0;\n b.ec = b.memory;\n b.fc = 0;\n b.cc = b.ec;\n b.dc = b.fc + a.U;\n b.Mc = b.cc;\n b.Nc = b.dc + c;\n b.Ib = Wd;\n ic();\n }\n } else alert(\"todo:EmitYUV\");\n e && ((b.Jb = Xd), d && Aa());\n }\n if (d && !jc) {\n for (a = 0; 256 > a; ++a)\n (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n (Zd[a] = -22014 * (a - 128) + Ba),\n ($d[a] = -45773 * (a - 128)),\n (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n for (a = ta; a < Eb; ++a)\n (b = (76283 * (a - 16) + Ba) >> Wa),\n (be[a - ta] = ga(b, 255)),\n (ce[a - ta] = ga((b + 8) >> 4, 15));\n jc = 1;\n }\n return 1;\n }\n function kc(a) {\n var b = a.ma,\n c = a.U,\n d = a.T;\n x(!(a.ka & 1));\n if (0 >= c || 0 >= d) return 0;\n c = b.Ib(a, b);\n null != b.Jb && b.Jb(a, b, c);\n b.Dc += c;\n return 1;\n }\n function lc(a) {\n a.ma.memory = null;\n }\n function mc(a, b, c, d) {\n if (47 != D(a, 8)) return 0;\n b[0] = D(a, 14) + 1;\n c[0] = D(a, 14) + 1;\n d[0] = D(a, 1);\n return 0 != D(a, 3) ? 0 : !a.h;\n }\n function ib(a, b) {\n if (4 > a) return a + 1;\n var c = (a - 2) >> 1;\n return ((2 + (a & 1)) << c) + D(b, c) + 1;\n }\n function nc(a, b) {\n if (120 < b) return b - 120;\n var c = de[b - 1],\n c = (c >> 4) * a + (8 - (c & 15));\n return 1 <= c ? c : 1;\n }\n function ua(a, b, c) {\n var d = pb(c);\n b += d & 255;\n var e = a[b].g - 8;\n 0 < e &&\n (qb(c, c.u + 8),\n (d = pb(c)),\n (b += a[b].value),\n (b += d & ((1 << e) - 1)));\n qb(c, c.u + a[b].g);\n return a[b].value;\n }\n function ub(a, b, c) {\n c.g += a.g;\n c.value += (a.value << b) >>> 0;\n x(8 >= c.g);\n return a.g;\n }\n function ha(a, b, c) {\n var d = a.xc;\n b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n x(b < a.Wb);\n return a.Ya[b];\n }\n function oc(a, b, c, d) {\n var e = a.ab,\n f = a.c * b,\n g = a.C;\n b = g + b;\n var h = c,\n k = d;\n d = a.Ta;\n for (c = a.Ua; 0 < e--; ) {\n var l = a.gc[e],\n m = g,\n n = b,\n r = h,\n q = k,\n k = d,\n h = c,\n t = l.Ea;\n x(m < n);\n x(n <= l.nc);\n switch (l.hc) {\n case 2:\n pc(r, q, (n - m) * t, k, h);\n break;\n case 0:\n var v = l,\n p = m,\n u = n,\n w = k,\n y = h,\n A = v.Ea;\n 0 == p &&\n (ee(r, q, null, null, 1, w, y),\n cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n (q += A),\n (y += A),\n ++p);\n for (\n var E = 1 << v.b,\n B = E - 1,\n C = xa(A, v.b),\n N = v.K,\n v = v.w + (p >> v.b) * C;\n p < u;\n\n ) {\n var z = N,\n Q = v,\n S = 1;\n for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n var K = qc[(z[Q++] >> 8) & 15],\n D = (S & ~B) + E;\n D > A && (D = A);\n K(r, q + +S, w, y + S - A, D - S, w, y + S);\n S = D;\n }\n q += A;\n y += A;\n ++p;\n p & B || (v += C);\n }\n n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n break;\n case 1:\n t = r;\n u = q;\n r = l.Ea;\n q = 1 << l.b;\n w = q - 1;\n y = r & ~w;\n A = r - y;\n p = xa(r, l.b);\n E = l.K;\n for (l = l.w + (m >> l.b) * p; m < n; ) {\n B = E;\n C = l;\n N = new Jd();\n v = u + y;\n for (z = u + r; u < v; )\n dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n u < z &&\n (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n ++m;\n m & w || (l += p);\n }\n break;\n case 3:\n if (r == k && q == h && 0 < l.b) {\n y = (n - m) * xa(l.Ea, l.b);\n t = h + (n - m) * t - y;\n u = k;\n r = t;\n q = k;\n w = h;\n A = y;\n p = [];\n for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n rc(l, m, n, k, t, k, h);\n } else rc(l, m, n, r, q, k, h);\n }\n h = d;\n k = c;\n }\n k != c && I(d, c, h, k, f);\n }\n function ge(a, b) {\n var c = a.V,\n d = a.Ba + a.c * a.C,\n e = b - a.C;\n x(b <= a.l.o);\n x(16 >= e);\n if (0 < e) {\n var f = a.l,\n g = a.Ta,\n h = a.Ua,\n k = f.width;\n oc(a, e, c, d);\n h = [h];\n c = a.C;\n d = b;\n e = h;\n x(c < d);\n x(f.v < f.va);\n d > f.o && (d = f.o);\n if (c < f.j) {\n var l = f.j - c,\n c = f.j;\n e[0] += l * k;\n }\n c >= d\n ? (c = 0)\n : ((e[0] += 4 * f.v),\n (f.ka = c - f.j),\n (f.U = f.va - f.v),\n (f.T = d - c),\n (c = 1));\n if (c) {\n h = h[0];\n c = a.ca;\n if (11 > c.S) {\n for (\n var m = c.f.RGBA,\n d = c.S,\n e = f.U,\n f = f.T,\n l = m.eb,\n n = m.A,\n r = f,\n m = m.fb + a.Ma * m.A;\n 0 < r--;\n\n ) {\n var q = g,\n t = h,\n v = e,\n p = l,\n u = m;\n switch (d) {\n case Ca:\n sc(q, t, v, p, u);\n break;\n case Ua:\n Gb(q, t, v, p, u);\n break;\n case zb:\n Gb(q, t, v, p, u);\n za(p, u, 0, v, 1, 0);\n break;\n case tc:\n uc(q, t, v, p, u);\n break;\n case Va:\n fb(q, t, v, p, u, 1);\n break;\n case Ab:\n fb(q, t, v, p, u, 1);\n za(p, u, 0, v, 1, 0);\n break;\n case ya:\n fb(q, t, v, p, u, 0);\n break;\n case Ja:\n fb(q, t, v, p, u, 0);\n za(p, u, 1, v, 1, 0);\n break;\n case Db:\n Hb(q, t, v, p, u);\n break;\n case Bb:\n Hb(q, t, v, p, u);\n vc(p, u, v, 1, 0);\n break;\n case wc:\n xc(q, t, v, p, u);\n break;\n default:\n x(0);\n }\n h += k;\n m += n;\n }\n a.Ma += f;\n } else alert(\"todo:EmitRescaledRowsYUVA\");\n x(a.Ma <= c.height);\n }\n }\n a.C = b;\n x(a.C <= a.i);\n }\n function yc(a) {\n var b;\n if (0 < a.ua) return 0;\n for (b = 0; b < a.Wb; ++b) {\n var c = a.Ya[b].G,\n d = a.Ya[b].H;\n if (\n 0 < c[1][d[1] + 0].g ||\n 0 < c[2][d[2] + 0].g ||\n 0 < c[3][d[3] + 0].g\n )\n return 0;\n }\n return 1;\n }\n function zc(a, b, c, d, e, f) {\n if (0 != a.Z) {\n var g = a.qd,\n h = a.rd;\n for (x(null != ia[a.Z]); b < c; ++b)\n ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n a.qd = g;\n a.rd = h;\n }\n }\n function Ib(a, b) {\n var c = a.l.ma,\n d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n d = a.C < d ? d : a.C;\n x(b <= a.l.o);\n if (b > d) {\n var e = a.l.width,\n f = c.ca,\n g = c.tb + e * d,\n h = a.V,\n k = a.Ba + a.c * d,\n l = a.gc;\n x(1 == a.ab);\n x(3 == l[0].hc);\n he(l[0], d, b, h, k, f, g);\n zc(c, d, b, f, g, e);\n }\n a.C = a.Ma = b;\n }\n function Jb(a, b, c, d, e, f, g) {\n var h = a.$ / d,\n k = a.$ % d,\n l = a.m,\n m = a.s,\n n = c + a.$,\n r = n;\n e = c + d * e;\n var q = c + d * f,\n t = 280 + m.ua,\n v = a.Pb ? h : 16777216,\n p = 0 < m.ua ? m.Wa : null,\n u = m.wc,\n w = n < q ? ha(m, k, h) : null;\n x(a.C < f);\n x(q <= e);\n var y = !1;\n a: for (;;) {\n for (; y || n < q; ) {\n var A = 0;\n if (h >= v) {\n var v = a,\n E = n - c;\n x(v.Pb);\n v.wd = v.m;\n v.xd = E;\n 0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n v = h + ie;\n }\n k & u || (w = ha(m, k, h));\n x(null != w);\n w.Qb && ((b[n] = w.qb), (y = !0));\n if (!y)\n if ((Sa(l), w.jc)) {\n var A = l,\n E = b,\n B = n,\n C = w.pd[pb(A) & (xb - 1)];\n x(w.jc);\n 256 > C.g\n ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n 0 == A && (y = !0);\n } else A = ua(w.G[0], w.H[0], l);\n if (l.h) break;\n if (y || 256 > A) {\n if (!y)\n if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n else {\n Sa(l);\n y = ua(w.G[1], w.H[1], l);\n Sa(l);\n E = ua(w.G[2], w.H[2], l);\n B = ua(w.G[3], w.H[3], l);\n if (l.h) break;\n b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n }\n y = !1;\n ++n;\n ++k;\n if (\n k >= d &&\n ((k = 0),\n ++h,\n null != g && h <= f && !(h % 16) && g(a, h),\n null != p)\n )\n for (; r < n; )\n (A = b[r++]),\n (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n } else if (280 > A) {\n A = ib(A - 256, l);\n E = ua(w.G[4], w.H[4], l);\n Sa(l);\n E = ib(E, l);\n E = nc(d, E);\n if (l.h) break;\n if (n - c < E || e - n < A) break a;\n else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n n += A;\n for (k += A; k >= d; )\n (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n x(n <= e);\n k & u && (w = ha(m, k, h));\n if (null != p)\n for (; r < n; )\n (A = b[r++]),\n (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n } else if (A < t) {\n y = A - 280;\n for (x(null != p); r < n; )\n (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n A = n;\n E = p;\n x(!(y >>> E.Xa));\n b[A] = E.X[y];\n y = !0;\n } else break a;\n y || x(l.h == db(l));\n }\n if (a.Pb && l.h && n < e)\n x(a.m.h),\n (a.a = 5),\n (a.m = a.wd),\n (a.$ = a.xd),\n 0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n else if (l.h) break a;\n else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n return 1;\n }\n a.a = 3;\n return 0;\n }\n function Ac(a) {\n x(null != a);\n a.vc = null;\n a.yc = null;\n a.Ya = null;\n var b = a.Wa;\n null != b && (b.X = null);\n a.vb = null;\n x(null != a);\n }\n function Bc() {\n var a = new je();\n if (null == a) return null;\n a.a = 0;\n a.xb = Cc;\n gb(\"Predictor\", \"VP8LPredictors\");\n gb(\"Predictor\", \"VP8LPredictors_C\");\n gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n pc = Kd;\n Fb = Ld;\n sc = Md;\n Gb = Nd;\n Hb = Od;\n xc = Pd;\n uc = Qd;\n self.VP8LMapColor32b = ke;\n self.VP8LMapColor8b = le;\n return a;\n }\n function rb(a, b, c, d, e) {\n var f = 1,\n g = [a],\n h = [b],\n k = d.m,\n l = d.s,\n m = null,\n n = 0;\n a: for (;;) {\n if (c)\n for (; f && D(k, 1); ) {\n var r = g,\n q = h,\n t = d,\n v = 1,\n p = t.m,\n u = t.gc[t.ab],\n w = D(p, 2);\n if (t.Oc & (1 << w)) f = 0;\n else {\n t.Oc |= 1 << w;\n u.hc = w;\n u.Ea = r[0];\n u.nc = q[0];\n u.K = [null];\n ++t.ab;\n x(4 >= t.ab);\n switch (w) {\n case 0:\n case 1:\n u.b = D(p, 3) + 2;\n v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n u.K = u.K[0];\n break;\n case 3:\n var y = D(p, 8) + 1,\n A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n r[0] = xa(u.Ea, A);\n u.b = A;\n var v = rb(y, 1, 0, t, u.K),\n E;\n if ((E = v)) {\n var B,\n C = y,\n N = u,\n z = 1 << (8 >> N.b),\n Q = V(z);\n if (null == Q) E = 0;\n else {\n var S = N.K[0],\n K = N.w;\n Q[0] = N.K[0][0];\n for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n for (; B < 4 * z; ++B) Q[B] = 0;\n N.K[0] = null;\n N.K[0] = Q;\n E = 1;\n }\n }\n v = E;\n break;\n case 2:\n break;\n default:\n x(0);\n }\n f = v;\n }\n }\n g = g[0];\n h = h[0];\n if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n d.a = 3;\n break a;\n }\n var H;\n if ((H = f))\n b: {\n var F = d,\n G = g,\n L = h,\n J = n,\n T = c,\n Da,\n ba,\n X = F.m,\n R = F.s,\n P = [null],\n U,\n W = 1,\n aa = 0,\n na = me[J];\n c: for (;;) {\n if (T && D(X, 1)) {\n var ca = D(X, 3) + 2,\n ga = xa(G, ca),\n ka = xa(L, ca),\n qa = ga * ka;\n if (!rb(ga, ka, 0, F, P)) break c;\n P = P[0];\n R.xc = ca;\n for (Da = 0; Da < qa; ++Da) {\n var ia = (P[Da] >> 8) & 65535;\n P[Da] = ia;\n ia >= W && (W = ia + 1);\n }\n }\n if (X.h) break c;\n for (ba = 0; 5 > ba; ++ba) {\n var Y = Dc[ba];\n !ba && 0 < J && (Y += 1 << J);\n aa < Y && (aa = Y);\n }\n var ma = wa(W * na, O);\n var ua = W,\n va = wa(ua, Ub);\n if (null == va) var la = null;\n else x(65536 >= ua), (la = va);\n var ha = V(aa);\n if (null == la || null == ha || null == ma) {\n F.a = 1;\n break c;\n }\n var pa = ma;\n for (Da = U = 0; Da < W; ++Da) {\n var ja = la[Da],\n da = ja.G,\n ea = ja.H,\n Fa = 0,\n ra = 1,\n Ha = 0;\n for (ba = 0; 5 > ba; ++ba) {\n Y = Dc[ba];\n da[ba] = pa;\n ea[ba] = U;\n !ba && 0 < J && (Y += 1 << J);\n d: {\n var sa,\n za = Y,\n ta = F,\n oa = ha,\n db = pa,\n eb = U,\n Ia = 0,\n Ka = ta.m,\n fb = D(Ka, 1);\n M(oa, 0, 0, za);\n if (fb) {\n var gb = D(Ka, 1) + 1,\n hb = D(Ka, 1),\n Ja = D(Ka, 0 == hb ? 1 : 8);\n oa[Ja] = 1;\n 2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n var ya = 1;\n } else {\n var Ua = V(19),\n Va = D(Ka, 4) + 4;\n if (19 < Va) {\n ta.a = 3;\n var Aa = 0;\n break d;\n }\n for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n var Ba = void 0,\n sb = void 0,\n Wa = ta,\n ib = Ua,\n Ca = za,\n Xa = oa,\n Oa = 0,\n La = Wa.m,\n Ya = 8,\n Za = wa(128, O);\n e: for (;;) {\n if (!Z(Za, 0, 7, ib, 19)) break e;\n if (D(La, 1)) {\n var kb = 2 + 2 * D(La, 3),\n Ba = 2 + D(La, kb);\n if (Ba > Ca) break e;\n } else Ba = Ca;\n for (sb = 0; sb < Ca && Ba--; ) {\n Sa(La);\n var $a = Za[0 + (pb(La) & 127)];\n qb(La, La.u + $a.g);\n var jb = $a.value;\n if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n else {\n var lb = 16 == jb,\n ab = jb - 16,\n mb = oe[ab],\n bb = D(La, pe[ab]) + mb;\n if (sb + bb > Ca) break e;\n else\n for (var nb = lb ? Ya : 0; 0 < bb--; )\n Xa[sb++] = nb;\n }\n }\n Oa = 1;\n break e;\n }\n Oa || (Wa.a = 3);\n ya = Oa;\n }\n (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n }\n if (0 == Aa) break c;\n ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n Fa += pa[U].g;\n U += Aa;\n if (3 >= ba) {\n var Pa = ha[0],\n tb;\n for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n Ha += Pa;\n }\n }\n ja.nd = ra;\n ja.Qb = 0;\n ra &&\n ((ja.qb =\n ((da[3][ea[3] + 0].value << 24) |\n (da[1][ea[1] + 0].value << 16) |\n da[2][ea[2] + 0].value) >>>\n 0),\n 0 == Fa &&\n 256 > da[0][ea[0] + 0].value &&\n ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n ja.jc = !ja.Qb && 6 > Ha;\n if (ja.jc) {\n var Ga,\n Ea = ja;\n for (Ga = 0; Ga < xb; ++Ga) {\n var Ma = Ga,\n Na = Ea.pd[Ma],\n vb = Ea.G[0][Ea.H[0] + Ma];\n 256 <= vb.value\n ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n : ((Na.g = 0),\n (Na.value = 0),\n (Ma >>= ub(vb, 8, Na)),\n (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n }\n }\n }\n R.vc = P;\n R.Wb = W;\n R.Ya = la;\n R.yc = ma;\n H = 1;\n break b;\n }\n H = 0;\n }\n f = H;\n if (!f) {\n d.a = 3;\n break a;\n }\n if (0 < n) {\n if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n d.a = 1;\n f = 0;\n break a;\n }\n } else l.ua = 0;\n var Qa = d,\n cb = g,\n ob = h,\n Ra = Qa.s,\n Ta = Ra.xc;\n Qa.c = cb;\n Qa.i = ob;\n Ra.md = xa(cb, Ta);\n Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n if (c) {\n d.xb = re;\n break a;\n }\n m = V(g * h);\n if (null == m) {\n d.a = 1;\n f = 0;\n break a;\n }\n f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n break a;\n }\n f\n ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n : Ac(l);\n return f;\n }\n function Ec(a, b) {\n var c = a.c * a.i,\n d = c + b + 16 * b;\n x(a.c <= b);\n a.V = V(d);\n if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n a.Ta = a.V;\n a.Ua = a.Ba + c + b;\n return 1;\n }\n function se(a, b) {\n var c = a.C,\n d = b - c,\n e = a.V,\n f = a.Ba + a.c * c;\n for (x(b <= a.l.o); 0 < d; ) {\n var g = 16 < d ? 16 : d,\n h = a.l.ma,\n k = a.l.width,\n l = k * g,\n m = h.ca,\n n = h.tb + k * c,\n r = a.Ta,\n q = a.Ua;\n oc(a, g, e, f);\n Fc(r, q, m, n, l);\n zc(h, c, c + g, m, n, k);\n d -= g;\n e += g * a.c;\n c += g;\n }\n x(c == b);\n a.C = a.Ma = b;\n }\n function te(a, b) {\n var c = [0],\n d = [0],\n e = [0];\n a: for (;;) {\n if (null == a) return 0;\n if (null == b) return (a.a = 2), 0;\n a.l = b;\n a.a = 0;\n cb(a.m, b.data, b.w, b.ha);\n if (!mc(a.m, c, d, e)) {\n a.a = 3;\n break a;\n }\n a.xb = Cc;\n b.width = c[0];\n b.height = d[0];\n if (!rb(c[0], d[0], 1, a, null)) break a;\n return 1;\n }\n x(0 != a.a);\n return 0;\n }\n function ue() {\n this.ub = this.yd = this.td = this.Rb = 0;\n }\n function ve() {\n this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n }\n function we() {\n this.Fb = this.Bb = this.Cb = 0;\n this.Zb = V(4);\n this.Lb = V(4);\n }\n function Gc() {\n this.Yb = wb();\n }\n function xe() {\n this.jb = V(3);\n this.Wc = Ed([4, 8], Gc);\n this.Xc = Ed([4, 17], Gc);\n }\n function ye() {\n this.Pc = this.wb = this.Tb = this.zd = 0;\n this.vd = new V(4);\n this.od = new V(4);\n }\n function Xa() {\n this.ld = this.La = this.dd = this.tc = 0;\n }\n function Hc() {\n this.Na = this.la = 0;\n }\n function ze() {\n this.Sc = [0, 0];\n this.Eb = [0, 0];\n this.Qc = [0, 0];\n this.ia = this.lc = 0;\n }\n function Kb() {\n this.ad = V(384);\n this.Za = 0;\n this.Ob = V(16);\n this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n }\n function Ae() {\n this.uc = this.M = this.Nb = 0;\n this.wa = Array(new Xa());\n this.Y = 0;\n this.ya = Array(new Kb());\n this.aa = 0;\n this.l = new Oa();\n }\n function Ic() {\n this.y = V(16);\n this.f = V(8);\n this.ea = V(8);\n }\n function Be() {\n this.cb = this.a = 0;\n this.sc = \"\";\n this.m = new Wb();\n this.Od = new ue();\n this.Kc = new ve();\n this.ed = new ye();\n this.Qa = new we();\n this.Ic = this.$c = this.Aa = 0;\n this.D = new Ae();\n this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n this.Jc = wa(8, Wb);\n this.ia = 0;\n new F();\n this.pb = wa(4, ze);\n this.Pa = new xe();\n this.Bd = this.kc = 0;\n this.Ac = [];\n this.Bc = 0;\n this.zc = [0, 0, 0, 0];\n this.Gd = Array(new Ic());\n this.Hd = 0;\n this.rb = Array(new Hc());\n this.sb = 0;\n this.wa = Array(new Xa());\n this.Y = 0;\n this.oc = [];\n this.pc = 0;\n this.sa = [];\n this.ta = 0;\n this.qa = [];\n this.ra = 0;\n this.Ha = [];\n this.B = this.R = this.Ia = 0;\n this.Ec = [];\n this.M = this.ja = this.Vb = this.Fc = 0;\n this.ya = Array(new Kb());\n this.L = this.aa = 0;\n this.gd = Ed([4, 2], Xa);\n this.ga = null;\n this.Fa = [];\n this.Cc = this.qc = this.P = 0;\n this.Gb = [];\n this.Uc = 0;\n this.mb = [];\n this.nb = 0;\n this.rc = [];\n this.Ga = this.Vc = 0;\n }\n function ga(a, b) {\n return 0 > a ? 0 : a > b ? b : a;\n }\n function Oa() {\n this.T = this.U = this.ka = this.height = this.width = 0;\n this.y = [];\n this.f = [];\n this.ea = [];\n this.Rc = this.fa = this.W = this.N = this.O = 0;\n this.ma = \"void\";\n this.put = \"VP8IoPutHook\";\n this.ac = \"VP8IoSetupHook\";\n this.bc = \"VP8IoTeardownHook\";\n this.ha = this.Kb = 0;\n this.data = [];\n this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n this.F = [];\n this.J = 0;\n }\n function Ce() {\n var a = new Be();\n null != a &&\n ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n return a;\n }\n function T(a, b, c) {\n 0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n return 0;\n }\n function Jc(a, b, c) {\n return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n }\n function Kc(a, b) {\n if (null == a) return 0;\n a.a = 0;\n a.sc = \"OK\";\n if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n var c = b.data;\n var d = b.w;\n var e = b.ha;\n if (4 > e) return T(a, 7, \"Truncated header.\");\n var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n var g = a.Od;\n g.Rb = !(f & 1);\n g.td = (f >> 1) & 7;\n g.yd = (f >> 4) & 1;\n g.ub = f >> 5;\n if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n d += 3;\n e -= 3;\n var h = a.Kc;\n if (g.Rb) {\n if (7 > e) return T(a, 7, \"cannot parse picture header\");\n if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n h.Td = c[d + 4] >> 6;\n h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n h.Ud = c[d + 6] >> 6;\n d += 7;\n e -= 7;\n a.za = (h.c + 15) >> 4;\n a.Ub = (h.i + 15) >> 4;\n b.width = h.c;\n b.height = h.i;\n b.Da = 0;\n b.j = 0;\n b.v = 0;\n b.va = b.width;\n b.o = b.height;\n b.da = 0;\n b.ib = b.width;\n b.hb = b.height;\n b.U = b.width;\n b.T = b.height;\n f = a.Pa;\n M(f.jb, 0, 255, f.jb.length);\n f = a.Qa;\n x(null != f);\n f.Cb = 0;\n f.Bb = 0;\n f.Fb = 1;\n M(f.Zb, 0, 0, f.Zb.length);\n M(f.Lb, 0, 0, f.Lb);\n }\n if (g.ub > e) return T(a, 7, \"bad partition length\");\n f = a.m;\n ma(f, c, d, g.ub);\n d += g.ub;\n e -= g.ub;\n g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n h = a.Qa;\n var k = a.Pa,\n l;\n x(null != f);\n x(null != h);\n h.Cb = G(f);\n if (h.Cb) {\n h.Bb = G(f);\n if (G(f)) {\n h.Fb = G(f);\n for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n }\n if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n } else h.Bb = 0;\n if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n h = a.ed;\n h.zd = G(f);\n h.Tb = na(f, 6);\n h.wb = na(f, 3);\n h.Pc = G(f);\n if (h.Pc && G(f)) {\n for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n }\n a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n l = d;\n var m = e;\n e = l;\n d = l + m;\n h = m;\n a.Xb = (1 << na(a.m, 2)) - 1;\n k = a.Xb;\n if (m < 3 * k) c = 7;\n else {\n l += 3 * k;\n h -= 3 * k;\n for (m = 0; m < k; ++m) {\n var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n n > h && (n = h);\n ma(a.Jc[+m], c, l, n);\n l += n;\n h -= n;\n e += 3;\n }\n ma(a.Jc[+k], c, l, h);\n c = l < d ? 0 : 5;\n }\n if (0 != c) return T(a, c, \"cannot parse partitions\");\n l = a.m;\n c = na(l, 7);\n e = G(l) ? ca(l, 4) : 0;\n d = G(l) ? ca(l, 4) : 0;\n h = G(l) ? ca(l, 4) : 0;\n k = G(l) ? ca(l, 4) : 0;\n l = G(l) ? ca(l, 4) : 0;\n m = a.Qa;\n for (n = 0; 4 > n; ++n) {\n if (m.Cb) {\n var r = m.Zb[n];\n m.Fb || (r += c);\n } else if (0 < n) {\n a.pb[n] = a.pb[0];\n continue;\n } else r = c;\n var q = a.pb[n];\n q.Sc[0] = Lb[ga(r + e, 127)];\n q.Sc[1] = Mb[ga(r + 0, 127)];\n q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n 8 > q.Eb[1] && (q.Eb[1] = 8);\n q.Qc[0] = Lb[ga(r + k, 117)];\n q.Qc[1] = Mb[ga(r + l, 127)];\n q.lc = r + l;\n }\n if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n G(f);\n g = a.Pa;\n for (c = 0; 4 > c; ++c) {\n for (e = 0; 8 > e; ++e)\n for (d = 0; 3 > d; ++d)\n for (h = 0; 11 > h; ++h)\n (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n (g.Wc[c][e].Yb[d][h] = k);\n for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n }\n a.kc = G(f);\n a.kc && (a.Bd = na(f, 8));\n return (a.cb = 1);\n }\n function De(a, b, c, d, e, f, g) {\n var h = b[e].Yb[c];\n for (c = 0; 16 > e; ++e) {\n if (!K(a, h[c + 0])) return e;\n for (; !K(a, h[c + 1]); )\n if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n var k = b[e + 1].Yb;\n if (K(a, h[c + 2])) {\n var l = a,\n m = h,\n n = c;\n var r = 0;\n if (K(l, m[n + 3]))\n if (K(l, m[n + 6])) {\n h = 0;\n r = K(l, m[n + 8]);\n m = K(l, m[n + 9 + r]);\n n = 2 * r + m;\n r = 0;\n for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n r += 3 + (8 << n);\n } else\n K(l, m[n + 7])\n ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n : (r = 5 + K(l, 159));\n else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n h = k[2];\n } else (r = 1), (h = k[1]);\n k = g + Ie[e];\n l = a;\n 0 > l.b && Qa(l);\n var m = l.b,\n n = l.Ca >> 1,\n q = (n - (l.I >> m)) >> 31;\n --l.b;\n l.Ca += q;\n l.Ca |= 1;\n l.I -= ((n + 1) & q) << m;\n f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n }\n return 16;\n }\n function Lc(a) {\n var b = a.rb[a.sb - 1];\n b.la = 0;\n b.Na = 0;\n M(a.zc, 0, 0, a.zc.length);\n a.ja = 0;\n }\n function Je(a, b) {\n for (a.M = 0; a.M < a.Va; ++a.M) {\n var c = a.Jc[a.M & a.Xb],\n d = a.m,\n e = a,\n f;\n for (f = 0; f < e.za; ++f) {\n var g = d;\n var h = e;\n var k = h.Ac,\n l = h.Bc + 4 * f,\n m = h.zc,\n n = h.ya[h.aa + f];\n h.Qa.Bb\n ? (n.$b = K(g, h.Pa.jb[0])\n ? 2 + K(g, h.Pa.jb[2])\n : K(g, h.Pa.jb[1]))\n : (n.$b = 0);\n h.kc && (n.Ad = K(g, h.Bd));\n n.Za = !K(g, 145) + 0;\n if (n.Za) {\n var r = n.Ob,\n q = 0;\n for (h = 0; 4 > h; ++h) {\n var t = m[0 + h];\n var v;\n for (v = 0; 4 > v; ++v) {\n t = Ke[k[l + v]][t];\n for (var p = Mc[K(g, t[0])]; 0 < p; )\n p = Mc[2 * p + K(g, t[p])];\n t = -p;\n k[l + v] = t;\n }\n I(r, q, k, l, 4);\n q += 4;\n m[0 + h] = t;\n }\n } else\n (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n (n.Ob[0] = t),\n M(k, l, t, 4),\n M(m, 0, t, 4);\n n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n }\n if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n for (; a.ja < a.za; ++a.ja) {\n d = a;\n e = c;\n g = d.rb[d.sb - 1];\n k = d.rb[d.sb + d.ja];\n f = d.ya[d.aa + d.ja];\n if ((l = d.kc ? f.Ad : 0))\n (g.la = k.la = 0),\n f.Za || (g.Na = k.Na = 0),\n (f.Hc = 0),\n (f.Gc = 0),\n (f.ia = 0);\n else {\n var u,\n w,\n g = k,\n k = e,\n l = d.Pa.Xc,\n m = d.ya[d.aa + d.ja],\n n = d.pb[m.$b];\n h = m.ad;\n r = 0;\n q = d.rb[d.sb - 1];\n t = v = 0;\n M(h, r, 0, 384);\n if (m.Za) {\n var y = 0;\n var A = l[3];\n } else {\n p = V(16);\n var E = g.Na + q.Na;\n E = oa(k, l[1], E, n.Eb, 0, p, 0);\n g.Na = q.Na = (0 < E) + 0;\n if (1 < E) Nc(p, 0, h, r);\n else {\n var B = (p[0] + 3) >> 3;\n for (p = 0; 256 > p; p += 16) h[r + p] = B;\n }\n y = 1;\n A = l[0];\n }\n var C = g.la & 15;\n var N = q.la & 15;\n for (p = 0; 4 > p; ++p) {\n var z = N & 1;\n for (B = w = 0; 4 > B; ++B)\n (E = z + (C & 1)),\n (E = oa(k, A, E, n.Sc, y, h, r)),\n (z = E > y),\n (C = (C >> 1) | (z << 7)),\n (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n (r += 16);\n C >>= 4;\n N = (N >> 1) | (z << 7);\n v = ((v << 8) | w) >>> 0;\n }\n A = C;\n y = N >> 4;\n for (u = 0; 4 > u; u += 2) {\n w = 0;\n C = g.la >> (4 + u);\n N = q.la >> (4 + u);\n for (p = 0; 2 > p; ++p) {\n z = N & 1;\n for (B = 0; 2 > B; ++B)\n (E = z + (C & 1)),\n (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n (z = 0 < E),\n (C = (C >> 1) | (z << 3)),\n (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n (r += 16);\n C >>= 2;\n N = (N >> 1) | (z << 5);\n }\n t |= w << (4 * u);\n A |= (C << 4) << u;\n y |= (N & 240) << u;\n }\n g.la = A;\n q.la = y;\n m.Hc = v;\n m.Gc = t;\n m.ia = t & 43690 ? 0 : n.ia;\n l = !(v | t);\n }\n 0 < d.L &&\n ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n (d.wa[d.Y + d.ja].La |= !l));\n if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n }\n Lc(a);\n c = a;\n d = b;\n e = 1;\n f = c.D;\n g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n if (0 == c.Aa)\n a: {\n (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n w = c.D;\n f = w.Nb;\n t = Ya[c.L];\n g = t * c.R;\n k = (t / 2) * c.B;\n p = 16 * f * c.R;\n B = 8 * f * c.B;\n l = c.sa;\n m = c.ta - g + p;\n n = c.qa;\n h = c.ra - k + B;\n r = c.Ha;\n q = c.Ia - k + B;\n C = w.M;\n N = 0 == C;\n v = C >= c.Va - 1;\n 2 == c.Aa && Oc(c, w);\n if (w.uc)\n for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n var Q = E;\n y = w;\n A = z;\n var S = Q.D,\n D = S.Nb;\n u = Q.R;\n var S = S.wa[S.Y + y],\n F = Q.sa,\n H = Q.ta + 16 * D * u + 16 * y,\n J = S.dd,\n G = S.tc;\n if (0 != G)\n if ((x(3 <= G), 1 == Q.L))\n 0 < y && Pc(F, H, u, G + 4),\n S.La && Qc(F, H, u, G),\n 0 < A && Rc(F, H, u, G + 4),\n S.La && Sc(F, H, u, G);\n else {\n var L = Q.B,\n O = Q.qa,\n P = Q.ra + 8 * D * L + 8 * y,\n R = Q.Ha,\n Q = Q.Ia + 8 * D * L + 8 * y,\n D = S.ld;\n 0 < y &&\n (Tc(F, H, u, G + 4, J, D),\n Uc(O, P, R, Q, L, G + 4, J, D));\n S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n 0 < A &&\n (Xc(F, H, u, G + 4, J, D),\n Yc(O, P, R, Q, L, G + 4, J, D));\n S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n }\n }\n c.ia && alert(\"todo:DitherRow\");\n if (null != d.put) {\n w = 16 * C;\n C = 16 * (C + 1);\n N\n ? ((d.y = c.sa),\n (d.O = c.ta + p),\n (d.f = c.qa),\n (d.N = c.ra + B),\n (d.ea = c.Ha),\n (d.W = c.Ia + B))\n : ((w -= t),\n (d.y = l),\n (d.O = m),\n (d.f = n),\n (d.N = h),\n (d.ea = r),\n (d.W = q));\n v || (C -= t);\n C > d.o && (C = d.o);\n d.F = null;\n d.J = null;\n if (\n null != c.Fa &&\n 0 < c.Fa.length &&\n w < C &&\n ((d.J = Le(c, d, w, C - w)),\n (d.F = c.mb),\n null == d.F && 0 == d.F.length)\n ) {\n e = T(c, 3, \"Could not decode alpha data.\");\n break a;\n }\n w < d.j &&\n ((t = d.j - w),\n (w = d.j),\n x(!(t & 1)),\n (d.O += c.R * t),\n (d.N += c.B * (t >> 1)),\n (d.W += c.B * (t >> 1)),\n null != d.F && (d.J += d.width * t));\n w < C &&\n ((d.O += d.v),\n (d.N += d.v >> 1),\n (d.W += d.v >> 1),\n null != d.F && (d.J += d.v),\n (d.ka = w - d.j),\n (d.U = d.va - d.v),\n (d.T = C - w),\n (e = d.put(d)));\n }\n f + 1 != c.Ic ||\n v ||\n (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n }\n if (!e) return T(a, 6, \"Output aborted.\");\n }\n return 1;\n }\n function Me(a, b) {\n if (null == a) return 0;\n if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n if (!a.cb && !Kc(a, b)) return 0;\n x(a.cb);\n if (null == b.ac || b.ac(b)) {\n b.ob && (a.L = 0);\n var c = Ya[a.L];\n 2 == a.L\n ? ((a.yb = 0), (a.zb = 0))\n : ((a.yb = (b.v - c) >> 4),\n (a.zb = (b.j - c) >> 4),\n 0 > a.yb && (a.yb = 0),\n 0 > a.zb && (a.zb = 0));\n a.Va = (b.o + 15 + c) >> 4;\n a.Hb = (b.va + 15 + c) >> 4;\n a.Hb > a.za && (a.Hb = a.za);\n a.Va > a.Ub && (a.Va = a.Ub);\n if (0 < a.L) {\n var d = a.ed;\n for (c = 0; 4 > c; ++c) {\n var e;\n if (a.Qa.Cb) {\n var f = a.Qa.Lb[c];\n a.Qa.Fb || (f += d.Tb);\n } else f = d.Tb;\n for (e = 0; 1 >= e; ++e) {\n var g = a.gd[c][e],\n h = f;\n d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n h = 0 > h ? 0 : 63 < h ? 63 : h;\n if (0 < h) {\n var k = h;\n 0 < d.wb &&\n ((k = 4 < d.wb ? k >> 2 : k >> 1),\n k > 9 - d.wb && (k = 9 - d.wb));\n 1 > k && (k = 1);\n g.dd = k;\n g.tc = 2 * h + k;\n g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n } else g.tc = 0;\n g.La = e;\n }\n }\n }\n c = 0;\n } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n if ((c = 0 == c)) {\n if (c) {\n a.$c = 0;\n 0 < a.Aa || (a.Ic = Ne);\n b: {\n c = a.Ic;\n var k = a.za,\n d = 4 * k,\n l = 32 * k,\n m = k + 1,\n n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n r = (2 == a.Aa ? 2 : 1) * k;\n e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n g = d + 832 + e + f;\n if (g != g) c = 0;\n else {\n if (g > a.Vb) {\n a.Vb = 0;\n a.Ec = V(g);\n a.Fc = 0;\n if (null == a.Ec) {\n c = T(a, 1, \"no memory during frame initialization.\");\n break b;\n }\n a.Vb = g;\n }\n g = a.Ec;\n h = a.Fc;\n a.Ac = g;\n a.Bc = h;\n h += d;\n a.Gd = wa(l, Ic);\n a.Hd = 0;\n a.rb = wa(m + 1, Hc);\n a.sb = 1;\n a.wa = n ? wa(n, Xa) : null;\n a.Y = 0;\n a.D.Nb = 0;\n a.D.wa = a.wa;\n a.D.Y = a.Y;\n 0 < a.Aa && (a.D.Y += k);\n x(!0);\n a.oc = g;\n a.pc = h;\n h += 832;\n a.ya = wa(r, Kb);\n a.aa = 0;\n a.D.ya = a.ya;\n a.D.aa = a.aa;\n 2 == a.Aa && (a.D.aa += k);\n a.R = 16 * k;\n a.B = 8 * k;\n l = Ya[a.L];\n k = l * a.R;\n l = (l / 2) * a.B;\n a.sa = g;\n a.ta = h + k;\n a.qa = a.sa;\n a.ra = a.ta + 16 * c * a.R + l;\n a.Ha = a.qa;\n a.Ia = a.ra + 8 * c * a.B + l;\n a.$c = 0;\n h += e;\n a.mb = f ? g : null;\n a.nb = f ? h : null;\n x(h + f <= a.Fc + a.Vb);\n Lc(a);\n M(a.Ac, a.Bc, 0, d);\n c = 1;\n }\n }\n if (c) {\n b.ka = 0;\n b.y = a.sa;\n b.O = a.ta;\n b.f = a.qa;\n b.N = a.ra;\n b.ea = a.Ha;\n b.Vd = a.Ia;\n b.fa = a.R;\n b.Rc = a.B;\n b.F = null;\n b.J = 0;\n if (!ad) {\n for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n for (c = -1020; 1020 >= c; ++c)\n cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n for (c = -112; 112 >= c; ++c)\n dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n for (c = -255; 510 >= c; ++c)\n ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n ad = 1;\n }\n Nc = Oe;\n Za = Pe;\n Nb = Qe;\n pa = Re;\n Ob = Se;\n fd = Te;\n Xc = Ue;\n Tc = Ve;\n Yc = We;\n Uc = Xe;\n Zc = Ye;\n Vc = Ze;\n $c = $e;\n Wc = af;\n Rc = gd;\n Pc = hd;\n Sc = bf;\n Qc = cf;\n W[0] = df;\n W[1] = ef;\n W[2] = ff;\n W[3] = gf;\n W[4] = hf;\n W[5] = jf;\n W[6] = kf;\n W[7] = lf;\n W[8] = mf;\n W[9] = nf;\n Y[0] = of;\n Y[1] = pf;\n Y[2] = qf;\n Y[3] = rf;\n Y[4] = sf;\n Y[5] = tf;\n Y[6] = uf;\n ka[0] = vf;\n ka[1] = wf;\n ka[2] = xf;\n ka[3] = yf;\n ka[4] = zf;\n ka[5] = Af;\n ka[6] = Bf;\n c = 1;\n } else c = 0;\n }\n c && (c = Je(a, b));\n null != b.bc && b.bc(b);\n c &= 1;\n }\n if (!c) return 0;\n a.cb = 0;\n return c;\n }\n function qa(a, b, c, d, e) {\n e = a[b + c + 32 * d] + (e >> 3);\n a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n }\n function kb(a, b, c, d, e, f) {\n qa(a, b, 0, c, d + e);\n qa(a, b, 1, c, d + f);\n qa(a, b, 2, c, d - f);\n qa(a, b, 3, c, d - e);\n }\n function da(a) {\n return ((20091 * a) >> 16) + a;\n }\n function id(a, b, c, d) {\n var e = 0,\n f;\n var g = V(16);\n for (f = 0; 4 > f; ++f) {\n var h = a[b + 0] + a[b + 8];\n var k = a[b + 0] - a[b + 8];\n var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n g[e + 0] = h + m;\n g[e + 1] = k + l;\n g[e + 2] = k - l;\n g[e + 3] = h - m;\n e += 4;\n b++;\n }\n for (f = e = 0; 4 > f; ++f)\n (a = g[e + 0] + 4),\n (h = a + g[e + 8]),\n (k = a - g[e + 8]),\n (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n qa(c, d, 0, 0, h + m),\n qa(c, d, 1, 0, k + l),\n qa(c, d, 2, 0, k - l),\n qa(c, d, 3, 0, h - m),\n e++,\n (d += 32);\n }\n function Te(a, b, c, d) {\n var e = a[b + 0] + 4,\n f = (35468 * a[b + 4]) >> 16,\n g = da(a[b + 4]),\n h = (35468 * a[b + 1]) >> 16;\n a = da(a[b + 1]);\n kb(c, d, 0, e + g, a, h);\n kb(c, d, 1, e + f, a, h);\n kb(c, d, 2, e - f, a, h);\n kb(c, d, 3, e - g, a, h);\n }\n function Pe(a, b, c, d, e) {\n id(a, b, c, d);\n e && id(a, b + 16, c, d + 4);\n }\n function Qe(a, b, c, d) {\n Za(a, b + 0, c, d, 1);\n Za(a, b + 32, c, d + 128, 1);\n }\n function Re(a, b, c, d) {\n a = a[b + 0] + 4;\n var e;\n for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n }\n function Se(a, b, c, d) {\n a[b + 0] && pa(a, b + 0, c, d);\n a[b + 16] && pa(a, b + 16, c, d + 4);\n a[b + 32] && pa(a, b + 32, c, d + 128);\n a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n }\n function Oe(a, b, c, d) {\n var e = V(16),\n f;\n for (f = 0; 4 > f; ++f) {\n var g = a[b + 0 + f] + a[b + 12 + f];\n var h = a[b + 4 + f] + a[b + 8 + f];\n var k = a[b + 4 + f] - a[b + 8 + f];\n var l = a[b + 0 + f] - a[b + 12 + f];\n e[0 + f] = g + h;\n e[8 + f] = g - h;\n e[4 + f] = l + k;\n e[12 + f] = l - k;\n }\n for (f = 0; 4 > f; ++f)\n (a = e[0 + 4 * f] + 3),\n (g = a + e[3 + 4 * f]),\n (h = e[1 + 4 * f] + e[2 + 4 * f]),\n (k = e[1 + 4 * f] - e[2 + 4 * f]),\n (l = a - e[3 + 4 * f]),\n (c[d + 0] = (g + h) >> 3),\n (c[d + 16] = (l + k) >> 3),\n (c[d + 32] = (g - h) >> 3),\n (c[d + 48] = (l - k) >> 3),\n (d += 64);\n }\n function Pb(a, b, c) {\n var d = b - 32,\n e = R,\n f = 255 - a[d - 1],\n g;\n for (g = 0; g < c; ++g) {\n var h = e,\n k = f + a[b - 1],\n l;\n for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n b += 32;\n }\n }\n function ef(a, b) {\n Pb(a, b, 4);\n }\n function wf(a, b) {\n Pb(a, b, 8);\n }\n function pf(a, b) {\n Pb(a, b, 16);\n }\n function qf(a, b) {\n var c;\n for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n }\n function rf(a, b) {\n var c;\n for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n }\n function $a(a, b, c) {\n var d;\n for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n }\n function of(a, b) {\n var c = 16,\n d;\n for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n $a(c >> 5, a, b);\n }\n function sf(a, b) {\n var c = 8,\n d;\n for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n $a(c >> 4, a, b);\n }\n function tf(a, b) {\n var c = 8,\n d;\n for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n $a(c >> 4, a, b);\n }\n function uf(a, b) {\n $a(128, a, b);\n }\n function z(a, b, c) {\n return (a + 2 * b + c + 2) >> 2;\n }\n function ff(a, b) {\n var c = b - 32,\n c = new Uint8Array([\n z(a[c - 1], a[c + 0], a[c + 1]),\n z(a[c + 0], a[c + 1], a[c + 2]),\n z(a[c + 1], a[c + 2], a[c + 3]),\n z(a[c + 2], a[c + 3], a[c + 4])\n ]),\n d;\n for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n }\n function gf(a, b) {\n var c = a[b - 1],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96];\n ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n ra(a, b + 32, 16843009 * z(c, d, e));\n ra(a, b + 64, 16843009 * z(d, e, f));\n ra(a, b + 96, 16843009 * z(e, f, f));\n }\n function df(a, b) {\n var c = 4,\n d;\n for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n c >>= 3;\n for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n }\n function hf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 - 32],\n g = a[b + 0 - 32],\n h = a[b + 1 - 32],\n k = a[b + 2 - 32],\n l = a[b + 3 - 32];\n a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n a[b + 3 + 0] = z(l, k, h);\n }\n function kf(a, b) {\n var c = a[b + 1 - 32],\n d = a[b + 2 - 32],\n e = a[b + 3 - 32],\n f = a[b + 4 - 32],\n g = a[b + 5 - 32],\n h = a[b + 6 - 32],\n k = a[b + 7 - 32];\n a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n a[b + 3 + 96] = z(h, k, k);\n }\n function jf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 - 32],\n g = a[b + 0 - 32],\n h = a[b + 1 - 32],\n k = a[b + 2 - 32],\n l = a[b + 3 - 32];\n a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n a[b + 3 + 0] = (k + l + 1) >> 1;\n a[b + 0 + 96] = z(e, d, c);\n a[b + 0 + 64] = z(d, c, f);\n a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n a[b + 3 + 32] = z(h, k, l);\n }\n function lf(a, b) {\n var c = a[b + 0 - 32],\n d = a[b + 1 - 32],\n e = a[b + 2 - 32],\n f = a[b + 3 - 32],\n g = a[b + 4 - 32],\n h = a[b + 5 - 32],\n k = a[b + 6 - 32],\n l = a[b + 7 - 32];\n a[b + 0 + 0] = (c + d + 1) >> 1;\n a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n a[b + 0 + 32] = z(c, d, e);\n a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n a[b + 3 + 64] = z(g, h, k);\n a[b + 3 + 96] = z(h, k, l);\n }\n function nf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96];\n a[b + 0 + 0] = (c + d + 1) >> 1;\n a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n a[b + 1 + 0] = z(c, d, e);\n a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n b + 2 + 96\n ] = a[b + 3 + 96] = f;\n }\n function mf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96],\n g = a[b - 1 - 32],\n h = a[b + 0 - 32],\n k = a[b + 1 - 32],\n l = a[b + 2 - 32];\n a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n a[b + 0 + 96] = (f + e + 1) >> 1;\n a[b + 3 + 0] = z(h, k, l);\n a[b + 2 + 0] = z(g, h, k);\n a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n a[b + 1 + 96] = z(f, e, d);\n }\n function xf(a, b) {\n var c;\n for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n }\n function yf(a, b) {\n var c;\n for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n }\n function lb(a, b, c) {\n var d;\n for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n }\n function vf(a, b) {\n var c = 8,\n d;\n for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n lb(c >> 4, a, b);\n }\n function Af(a, b) {\n var c = 4,\n d;\n for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n lb(c >> 3, a, b);\n }\n function zf(a, b) {\n var c = 4,\n d;\n for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n lb(c >> 3, a, b);\n }\n function Bf(a, b) {\n lb(128, a, b);\n }\n function ab(a, b, c) {\n var d = a[b - c],\n e = a[b + 0],\n f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n g = mb[112 + ((f + 4) >> 3)];\n a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n a[b + 0] = R[255 + e - g];\n }\n function jd(a, b, c, d) {\n var e = a[b + 0],\n f = a[b + c];\n return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n }\n function kd(a, b, c, d) {\n return (\n 4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n );\n }\n function ld(a, b, c, d, e) {\n var f = a[b - 3 * c],\n g = a[b - 2 * c],\n h = a[b - c],\n k = a[b + 0],\n l = a[b + c],\n m = a[b + 2 * c],\n n = a[b + 3 * c];\n return 4 * U[255 + h - k] + U[255 + g - l] > d\n ? 0\n : U[255 + a[b - 4 * c] - f] <= e &&\n U[255 + f - g] <= e &&\n U[255 + g - h] <= e &&\n U[255 + n - m] <= e &&\n U[255 + m - l] <= e &&\n U[255 + l - k] <= e;\n }\n function gd(a, b, c, d) {\n var e = 2 * d + 1;\n for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n }\n function hd(a, b, c, d) {\n var e = 2 * d + 1;\n for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n }\n function bf(a, b, c, d) {\n var e;\n for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n }\n function cf(a, b, c, d) {\n var e;\n for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n }\n function ea(a, b, c, d, e, f, g, h) {\n for (f = 2 * f + 1; 0 < e--; ) {\n if (ld(a, b, c, f, g))\n if (jd(a, b, c, h)) ab(a, b, c);\n else {\n var k = a,\n l = b,\n m = c,\n n = k[l - 2 * m],\n r = k[l - m],\n q = k[l + 0],\n t = k[l + m],\n v = k[l + 2 * m],\n p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n u = (27 * p + 63) >> 7,\n w = (18 * p + 63) >> 7,\n p = (9 * p + 63) >> 7;\n k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n k[l - 2 * m] = R[255 + n + w];\n k[l - m] = R[255 + r + u];\n k[l + 0] = R[255 + q - u];\n k[l + m] = R[255 + t - w];\n k[l + 2 * m] = R[255 + v - p];\n }\n b += d;\n }\n }\n function Fa(a, b, c, d, e, f, g, h) {\n for (f = 2 * f + 1; 0 < e--; ) {\n if (ld(a, b, c, f, g))\n if (jd(a, b, c, h)) ab(a, b, c);\n else {\n var k = a,\n l = b,\n m = c,\n n = k[l - m],\n r = k[l + 0],\n q = k[l + m],\n t = 3 * (r - n),\n v = mb[112 + ((t + 4) >> 3)],\n t = mb[112 + ((t + 3) >> 3)],\n p = (v + 1) >> 1;\n k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n k[l - m] = R[255 + n + t];\n k[l + 0] = R[255 + r - v];\n k[l + m] = R[255 + q - p];\n }\n b += d;\n }\n }\n function Ue(a, b, c, d, e, f) {\n ea(a, b, c, 1, 16, d, e, f);\n }\n function Ve(a, b, c, d, e, f) {\n ea(a, b, 1, c, 16, d, e, f);\n }\n function Ye(a, b, c, d, e, f) {\n var g;\n for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n }\n function Ze(a, b, c, d, e, f) {\n var g;\n for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n }\n function We(a, b, c, d, e, f, g, h) {\n ea(a, b, e, 1, 8, f, g, h);\n ea(c, d, e, 1, 8, f, g, h);\n }\n function Xe(a, b, c, d, e, f, g, h) {\n ea(a, b, 1, e, 8, f, g, h);\n ea(c, d, 1, e, 8, f, g, h);\n }\n function $e(a, b, c, d, e, f, g, h) {\n Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n }\n function af(a, b, c, d, e, f, g, h) {\n Fa(a, b + 4, 1, e, 8, f, g, h);\n Fa(c, d + 4, 1, e, 8, f, g, h);\n }\n function Cf() {\n this.ba = new Cb();\n this.ec = [];\n this.cc = [];\n this.Mc = [];\n this.Dc = this.Nc = this.dc = this.fc = 0;\n this.Oa = new Ud();\n this.memory = 0;\n this.Ib = \"OutputFunc\";\n this.Jb = \"OutputAlphaFunc\";\n this.Nd = \"OutputRowFunc\";\n }\n function md() {\n this.data = [];\n this.offset = this.kd = this.ha = this.w = 0;\n this.na = [];\n this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n }\n function Df() {\n this.nc = this.Ea = this.b = this.hc = 0;\n this.K = [];\n this.w = 0;\n }\n function Ef() {\n this.ua = 0;\n this.Wa = new ac();\n this.vb = new ac();\n this.md = this.xc = this.wc = 0;\n this.vc = [];\n this.Wb = 0;\n this.Ya = new Ub();\n this.yc = new O();\n }\n function je() {\n this.xb = this.a = 0;\n this.l = new Oa();\n this.ca = new Cb();\n this.V = [];\n this.Ba = 0;\n this.Ta = [];\n this.Ua = 0;\n this.m = new Ra();\n this.Pb = 0;\n this.wd = new Ra();\n this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n this.s = new Ef();\n this.ab = 0;\n this.gc = wa(4, Df);\n this.Oc = 0;\n }\n function Ff() {\n this.Lc = this.Z = this.$a = this.i = this.c = 0;\n this.l = new Oa();\n this.ic = 0;\n this.ca = [];\n this.tb = 0;\n this.qd = null;\n this.rd = 0;\n }\n function Rb(a, b, c, d, e, f, g) {\n a = null == a ? 0 : a[b + 0];\n for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n }\n function Gf(a, b, c, d, e, f, g) {\n if (null == a) Rb(null, null, c, d, e, f, g);\n else {\n var h;\n for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n }\n }\n function Hf(a, b, c, d, e, f, g) {\n if (null == a) Rb(null, null, c, d, e, f, g);\n else {\n var h = a[b + 0],\n k = h,\n l = h,\n m;\n for (m = 0; m < g; ++m)\n (h = a[b + m]),\n (k = l + h - k),\n (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n (k = h),\n (e[f + m] = l);\n }\n }\n function Le(a, b, c, d) {\n var e = b.width,\n f = b.o;\n x(null != a && null != b);\n if (0 > c || 0 >= d || c + d > f) return null;\n if (!a.Cc) {\n if (null == a.ga) {\n a.ga = new Ff();\n var g;\n (g = null == a.ga) ||\n ((g = b.width * b.o),\n x(0 == a.Gb.length),\n (a.Gb = V(g)),\n (a.Uc = 0),\n null == a.Gb\n ? (g = 0)\n : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n (g = !g));\n if (!g) {\n g = a.ga;\n var h = a.Fa,\n k = a.P,\n l = a.qc,\n m = a.mb,\n n = a.nb,\n r = k + 1,\n q = l - 1,\n t = g.l;\n x(null != h && null != m && null != b);\n ia[0] = null;\n ia[1] = Rb;\n ia[2] = Gf;\n ia[3] = Hf;\n g.ca = m;\n g.tb = n;\n g.c = b.width;\n g.i = b.height;\n x(0 < g.c && 0 < g.i);\n if (1 >= l) b = 0;\n else if (\n ((g.$a = (h[k + 0] >> 0) & 3),\n (g.Z = (h[k + 0] >> 2) & 3),\n (g.Lc = (h[k + 0] >> 4) & 3),\n (k = (h[k + 0] >> 6) & 3),\n 0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n )\n b = 0;\n else if (\n ((t.put = kc),\n (t.ac = gc),\n (t.bc = lc),\n (t.ma = g),\n (t.width = b.width),\n (t.height = b.height),\n (t.Da = b.Da),\n (t.v = b.v),\n (t.va = b.va),\n (t.j = b.j),\n (t.o = b.o),\n g.$a)\n )\n b: {\n x(1 == g.$a), (b = Bc());\n c: for (;;) {\n if (null == b) {\n b = 0;\n break b;\n }\n x(null != g);\n g.mc = b;\n b.c = g.c;\n b.i = g.i;\n b.l = g.l;\n b.l.ma = g;\n b.l.width = g.c;\n b.l.height = g.i;\n b.a = 0;\n cb(b.m, h, r, q);\n if (!rb(g.c, g.i, 1, b, null)) break c;\n 1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n ? ((g.ic = 1),\n (h = b.c * b.i),\n (b.Ta = null),\n (b.Ua = 0),\n (b.V = V(h)),\n (b.Ba = 0),\n null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n : ((g.ic = 0), (b = Ec(b, g.c)));\n if (!b) break c;\n b = 1;\n break b;\n }\n g.mc = null;\n b = 0;\n }\n else b = q >= g.c * g.i;\n g = !b;\n }\n if (g) return null;\n 1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n }\n x(null != a.ga);\n x(c + d <= f);\n a: {\n h = a.ga;\n b = h.c;\n f = h.l.o;\n if (0 == h.$a) {\n r = a.rc;\n q = a.Vc;\n t = a.Fa;\n k = a.P + 1 + c * b;\n l = a.mb;\n m = a.nb + c * b;\n x(k <= a.P + a.qc);\n if (0 != h.Z)\n for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n ia[h.Z](r, q, t, k, l, m, b),\n (r = l),\n (q = m),\n (m += b),\n (k += b);\n else\n for (g = 0; g < d; ++g)\n I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n a.rc = r;\n a.Vc = q;\n } else {\n x(null != h.mc);\n b = c + d;\n g = h.mc;\n x(null != g);\n x(b <= g.i);\n if (g.C >= b) b = 1;\n else if ((h.ic || Aa(), h.ic)) {\n var h = g.V,\n r = g.Ba,\n q = g.c,\n v = g.i,\n t = 1,\n k = g.$ / q,\n l = g.$ % q,\n m = g.m,\n n = g.s,\n p = g.$,\n u = q * v,\n w = q * b,\n y = n.wc,\n A = p < w ? ha(n, l, k) : null;\n x(p <= u);\n x(b <= v);\n x(yc(n));\n c: for (;;) {\n for (; !m.h && p < w; ) {\n l & y || (A = ha(n, l, k));\n x(null != A);\n Sa(m);\n v = ua(A.G[0], A.H[0], m);\n if (256 > v)\n (h[r + p] = v),\n ++p,\n ++l,\n l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n else if (280 > v) {\n var v = ib(v - 256, m);\n var E = ua(A.G[4], A.H[4], m);\n Sa(m);\n E = ib(E, m);\n E = nc(q, E);\n if (p >= E && u - p >= v) {\n var B;\n for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n } else {\n t = 0;\n break c;\n }\n p += v;\n for (l += v; l >= q; )\n (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n p < w && l & y && (A = ha(n, l, k));\n } else {\n t = 0;\n break c;\n }\n x(m.h == db(m));\n }\n Ib(g, k > b ? b : k);\n break c;\n }\n !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n b = t;\n } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n if (!b) {\n d = 0;\n break a;\n }\n }\n c + d >= f && (a.Cc = 1);\n d = 1;\n }\n if (!d) return null;\n if (\n a.Cc &&\n ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n )\n return alert(\"todo:WebPDequantizeLevels\"), null;\n }\n return a.nb + c * e;\n }\n function If(a, b, c, d, e, f) {\n for (; 0 < e--; ) {\n var g = a,\n h = b + (c ? 1 : 0),\n k = a,\n l = b + (c ? 0 : 3),\n m;\n for (m = 0; m < d; ++m) {\n var n = k[l + 4 * m];\n 255 != n &&\n ((n *= 32897),\n (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n }\n b += f;\n }\n }\n function Jf(a, b, c, d, e) {\n for (; 0 < d--; ) {\n var f;\n for (f = 0; f < c; ++f) {\n var g = a[b + 2 * f + 0],\n h = a[b + 2 * f + 1],\n k = h & 15,\n l = 4369 * k,\n h = (((h & 240) | (h >> 4)) * l) >> 16;\n a[b + 2 * f + 0] =\n (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n a[b + 2 * f + 1] = (h & 240) | k;\n }\n b += e;\n }\n }\n function Kf(a, b, c, d, e, f, g, h) {\n var k = 255,\n l,\n m;\n for (m = 0; m < e; ++m) {\n for (l = 0; l < d; ++l) {\n var n = a[b + l];\n f[g + 4 * l] = n;\n k &= n;\n }\n b += c;\n g += h;\n }\n return 255 != k;\n }\n function Lf(a, b, c, d, e) {\n var f;\n for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n }\n function Aa() {\n za = If;\n vc = Jf;\n fc = Kf;\n Fc = Lf;\n }\n function va(a, b, c) {\n self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n var d,\n E = (y - 1) >> 1;\n var B = h[k + 0] | (l[m + 0] << 16);\n var C = n[r + 0] | (q[t + 0] << 16);\n x(null != a);\n var z = (3 * B + C + 131074) >> 2;\n b(a[e + 0], z & 255, z >> 16, v, p);\n null != f &&\n ((z = (3 * C + B + 131074) >> 2),\n b(f[g + 0], z & 255, z >> 16, u, w));\n for (d = 1; d <= E; ++d) {\n var D = h[k + d] | (l[m + d] << 16);\n var G = n[r + d] | (q[t + d] << 16);\n var F = B + D + C + G + 524296;\n var H = (F + 2 * (D + C)) >> 3;\n F = (F + 2 * (B + G)) >> 3;\n z = (H + B) >> 1;\n B = (F + D) >> 1;\n b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n null != f &&\n ((z = (F + C) >> 1),\n (B = (H + G) >> 1),\n b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n B = D;\n C = G;\n }\n y & 1 ||\n ((z = (3 * B + C + 131074) >> 2),\n b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n null != f &&\n ((z = (3 * C + B + 131074) >> 2),\n b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n };\n }\n function ic() {\n P[Ca] = Mf;\n P[Ua] = nd;\n P[tc] = Nf;\n P[Va] = od;\n P[ya] = pd;\n P[Db] = qd;\n P[wc] = Of;\n P[zb] = nd;\n P[Ab] = od;\n P[Ja] = pd;\n P[Bb] = qd;\n }\n function Sb(a) {\n return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n }\n function bb(a, b) {\n return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n }\n function nb(a, b, c) {\n return Sb(\n ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n );\n }\n function Pa(a, b) {\n return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n }\n function Ga(a, b, c, d, e) {\n d[e + 0] = bb(a, c);\n d[e + 1] = nb(a, b, c);\n d[e + 2] = Pa(a, b);\n }\n function Tb(a, b, c, d, e) {\n d[e + 0] = Pa(a, b);\n d[e + 1] = nb(a, b, c);\n d[e + 2] = bb(a, c);\n }\n function sd(a, b, c, d, e) {\n var f = nb(a, b, c);\n b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n d[e + 1] = b;\n }\n function td(a, b, c, d, e) {\n var f = (Pa(a, b) & 240) | 15;\n d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n d[e + 1] = f;\n }\n function ud(a, b, c, d, e) {\n d[e + 0] = 255;\n Ga(a, b, c, d, e + 1);\n }\n function vd(a, b, c, d, e) {\n Tb(a, b, c, d, e);\n d[e + 3] = 255;\n }\n function wd(a, b, c, d, e) {\n Ga(a, b, c, d, e);\n d[e + 3] = 255;\n }\n function ga(a, b) {\n return 0 > a ? 0 : a > b ? b : a;\n }\n function la(a, b, c) {\n self[a] = function(a, e, f, g, h, k, l, m, n) {\n for (var d = m + (n & -2) * c; m != d; )\n b(a[e + 0], f[g + 0], h[k + 0], l, m),\n b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n (e += 2),\n ++g,\n ++k,\n (m += 2 * c);\n n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n };\n }\n function xd(a, b, c) {\n return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n }\n function yd(a, b, c, d, e) {\n switch (a >>> 30) {\n case 3:\n Za(b, c, d, e, 0);\n break;\n case 2:\n fd(b, c, d, e);\n break;\n case 1:\n pa(b, c, d, e);\n }\n }\n function Oc(a, b) {\n var c,\n d,\n e = b.M,\n f = b.Nb,\n g = a.oc,\n h = a.pc + 40,\n k = a.oc,\n l = a.pc + 584,\n m = a.oc,\n n = a.pc + 600;\n for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n for (c = 0; 8 > c; ++c)\n (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n 0 < e\n ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n : (M(g, h - 32 - 1, 127, 21),\n M(k, l - 32 - 1, 127, 9),\n M(m, n - 32 - 1, 127, 9));\n for (d = 0; d < a.za; ++d) {\n var r = b.ya[b.aa + d];\n if (0 < d) {\n for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n for (c = -1; 8 > c; ++c)\n I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n }\n var q = a.Gd,\n t = a.Hd + d,\n v = r.ad,\n p = r.Hc;\n 0 < e &&\n (I(g, h - 32, q[t].y, 0, 16),\n I(k, l - 32, q[t].f, 0, 8),\n I(m, n - 32, q[t].ea, 0, 8));\n if (r.Za) {\n var u = g;\n var w = h - 32 + 16;\n 0 < e &&\n (d >= a.za - 1\n ? M(u, w, q[t].y[15], 4)\n : I(u, w, q[t + 1].y, 0, 4));\n for (c = 0; 4 > c; c++)\n u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n for (c = 0; 16 > c; ++c, p <<= 2)\n (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n c = r.Gc;\n u = xd(d, e, r.Dd);\n ka[u](k, l);\n ka[u](m, n);\n r = c >> 0;\n p = v;\n u = k;\n w = l;\n r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n c >>= 8;\n r = m;\n p = n;\n c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n e < a.Ub - 1 &&\n (I(q[t].y, 0, g, h + 480, 16),\n I(q[t].f, 0, k, l + 224, 8),\n I(q[t].ea, 0, m, n + 224, 8));\n c = 8 * f * a.B;\n q = a.sa;\n t = a.ta + 16 * d + 16 * f * a.R;\n v = a.qa;\n r = a.ra + 8 * d + c;\n p = a.Ha;\n u = a.Ia + 8 * d + c;\n for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n for (c = 0; 8 > c; ++c)\n I(v, r + c * a.B, k, l + 32 * c, 8),\n I(p, u + c * a.B, m, n + 32 * c, 8);\n }\n }\n function Ad(a, b, c, d, e, f, g, h, k) {\n var l = [0],\n m = [0],\n n = 0,\n r = null != k ? k.kd : 0,\n q = null != k ? k : new md();\n if (null == a || 12 > c) return 7;\n q.data = a;\n q.w = b;\n q.ha = c;\n b = [b];\n c = [c];\n q.gb = [q.gb];\n a: {\n var t = b;\n var v = c;\n var p = q.gb;\n x(null != a);\n x(null != v);\n x(null != p);\n p[0] = 0;\n if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n if (fa(a, t[0] + 8, \"WEBP\")) {\n p = 3;\n break a;\n }\n var u = Ha(a, t[0] + 4);\n if (12 > u || 4294967286 < u) {\n p = 3;\n break a;\n }\n if (r && u > v[0] - 8) {\n p = 7;\n break a;\n }\n p[0] = u;\n t[0] += 12;\n v[0] -= 12;\n }\n p = 0;\n }\n if (0 != p) return p;\n u = 0 < q.gb[0];\n for (c = c[0]; ; ) {\n t = [0];\n n = [n];\n a: {\n var w = a;\n v = b;\n p = c;\n var y = n,\n A = l,\n z = m,\n B = t;\n y[0] = 0;\n if (8 > p[0]) p = 7;\n else {\n if (!fa(w, v[0], \"VP8X\")) {\n if (10 != Ha(w, v[0] + 4)) {\n p = 3;\n break a;\n }\n if (18 > p[0]) {\n p = 7;\n break a;\n }\n var C = Ha(w, v[0] + 8);\n var D = 1 + Yb(w, v[0] + 12);\n w = 1 + Yb(w, v[0] + 15);\n if (2147483648 <= D * w) {\n p = 3;\n break a;\n }\n null != B && (B[0] = C);\n null != A && (A[0] = D);\n null != z && (z[0] = w);\n v[0] += 18;\n p[0] -= 18;\n y[0] = 1;\n }\n p = 0;\n }\n }\n n = n[0];\n t = t[0];\n if (0 != p) return p;\n v = !!(t & 2);\n if (!u && n) return 3;\n null != f && (f[0] = !!(t & 16));\n null != g && (g[0] = v);\n null != h && (h[0] = 0);\n g = l[0];\n t = m[0];\n if (n && v && null == k) {\n p = 0;\n break;\n }\n if (4 > c) {\n p = 7;\n break;\n }\n if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n c = [c];\n q.na = [q.na];\n q.P = [q.P];\n q.Sa = [q.Sa];\n a: {\n C = a;\n p = b;\n u = c;\n var y = q.gb,\n A = q.na,\n z = q.P,\n B = q.Sa;\n D = 22;\n x(null != C);\n x(null != u);\n w = p[0];\n var F = u[0];\n x(null != A);\n x(null != B);\n A[0] = null;\n z[0] = null;\n for (B[0] = 0; ; ) {\n p[0] = w;\n u[0] = F;\n if (8 > F) {\n p = 7;\n break a;\n }\n var G = Ha(C, w + 4);\n if (4294967286 < G) {\n p = 3;\n break a;\n }\n var H = (8 + G + 1) & -2;\n D += H;\n if (0 < y && D > y) {\n p = 3;\n break a;\n }\n if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n p = 0;\n break a;\n }\n if (F[0] < H) {\n p = 7;\n break a;\n }\n fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n w += H;\n F -= H;\n }\n }\n c = c[0];\n q.na = q.na[0];\n q.P = q.P[0];\n q.Sa = q.Sa[0];\n if (0 != p) break;\n }\n c = [c];\n q.Ja = [q.Ja];\n q.xa = [q.xa];\n a: if (\n ((y = a),\n (p = b),\n (u = c),\n (A = q.gb[0]),\n (z = q.Ja),\n (B = q.xa),\n (C = p[0]),\n (w = !fa(y, C, \"VP8 \")),\n (D = !fa(y, C, \"VP8L\")),\n x(null != y),\n x(null != u),\n x(null != z),\n x(null != B),\n 8 > u[0])\n )\n p = 7;\n else {\n if (w || D) {\n y = Ha(y, C + 4);\n if (12 <= A && y > A - 12) {\n p = 3;\n break a;\n }\n if (r && y > u[0] - 8) {\n p = 7;\n break a;\n }\n z[0] = y;\n p[0] += 8;\n u[0] -= 8;\n B[0] = D;\n } else\n (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n (z[0] = u[0]);\n p = 0;\n }\n c = c[0];\n q.Ja = q.Ja[0];\n q.xa = q.xa[0];\n b = b[0];\n if (0 != p) break;\n if (4294967286 < q.Ja) return 3;\n null == h || v || (h[0] = q.xa ? 2 : 1);\n g = [g];\n t = [t];\n if (q.xa) {\n if (5 > c) {\n p = 7;\n break;\n }\n h = g;\n r = t;\n v = f;\n null == a || 5 > c\n ? (a = 0)\n : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n ? ((u = [0]),\n (y = [0]),\n (A = [0]),\n (z = new Ra()),\n cb(z, a, b, c),\n mc(z, u, y, A)\n ? (null != h && (h[0] = u[0]),\n null != r && (r[0] = y[0]),\n null != v && (v[0] = A[0]),\n (a = 1))\n : (a = 0))\n : (a = 0);\n } else {\n if (10 > c) {\n p = 7;\n break;\n }\n h = t;\n null == a || 10 > c || !Jc(a, b + 3, c - 3)\n ? (a = 0)\n : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n r & 1 ||\n 3 < ((r >> 1) & 7) ||\n !((r >> 4) & 1) ||\n r >> 5 >= q.Ja ||\n !v ||\n !a\n ? (a = 0)\n : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n }\n if (!a) return 3;\n g = g[0];\n t = t[0];\n if (n && (l[0] != g || m[0] != t)) return 3;\n null != k &&\n ((k[0] = q),\n (k.offset = b - k.w),\n x(4294967286 > b - k.w),\n x(k.offset == k.ha - c));\n break;\n }\n return 0 == p || (7 == p && n && null == k)\n ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n null != d && (d[0] = g),\n null != e && (e[0] = t),\n 0)\n : p;\n }\n function hc(a, b, c) {\n var d = b.width,\n e = b.height,\n f = 0,\n g = 0,\n h = d,\n k = e;\n b.Da = null != a && 0 < a.Da;\n if (\n b.Da &&\n ((h = a.cd),\n (k = a.bd),\n (f = a.v),\n (g = a.j),\n 11 > c || ((f &= -2), (g &= -2)),\n 0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n )\n return 0;\n b.v = f;\n b.j = g;\n b.va = f + h;\n b.o = g + k;\n b.U = h;\n b.T = k;\n b.da = null != a && 0 < a.da;\n if (b.da) {\n c = [a.ib];\n f = [a.hb];\n if (!bc(h, k, c, f)) return 0;\n b.ib = c[0];\n b.hb = f[0];\n }\n b.ob = null != a && a.ob;\n b.Kb = null == a || !a.Sd;\n b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n return 1;\n }\n function Bd(a) {\n if (null == a) return 2;\n if (11 > a.S) {\n var b = a.f.RGBA;\n b.fb += (a.height - 1) * b.A;\n b.A = -b.A;\n } else\n (b = a.f.kb),\n (a = a.height),\n (b.O += (a - 1) * b.fa),\n (b.fa = -b.fa),\n (b.N += ((a - 1) >> 1) * b.Ab),\n (b.Ab = -b.Ab),\n (b.W += ((a - 1) >> 1) * b.Db),\n (b.Db = -b.Db),\n null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n return 0;\n }\n function Cd(a, b, c, d) {\n if (null == d || 0 >= a || 0 >= b) return 2;\n if (null != c) {\n if (c.Da) {\n var e = c.cd,\n f = c.bd,\n g = c.v & -2,\n h = c.j & -2;\n if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n return 2;\n a = e;\n b = f;\n }\n if (c.da) {\n e = [c.ib];\n f = [c.hb];\n if (!bc(a, b, e, f)) return 2;\n a = e[0];\n b = f[0];\n }\n }\n d.width = a;\n d.height = b;\n a: {\n var k = d.width;\n var l = d.height;\n a = d.S;\n if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n else {\n if (0 >= d.Rd && null == d.sd) {\n var g = (f = e = b = 0),\n h = k * Dd[a],\n m = h * l;\n 11 > a ||\n ((b = (k + 1) / 2),\n (f = ((l + 1) / 2) * b),\n 12 == a && ((e = k), (g = e * l)));\n l = V(m + 2 * f + g);\n if (null == l) {\n a = 1;\n break a;\n }\n d.sd = l;\n 11 > a\n ? ((k = d.f.RGBA),\n (k.eb = l),\n (k.fb = 0),\n (k.A = h),\n (k.size = m))\n : ((k = d.f.kb),\n (k.y = l),\n (k.O = 0),\n (k.fa = h),\n (k.Fd = m),\n (k.f = l),\n (k.N = 0 + m),\n (k.Ab = b),\n (k.Cd = f),\n (k.ea = l),\n (k.W = 0 + m + f),\n (k.Db = b),\n (k.Ed = f),\n 12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n (k.Tc = g),\n (k.lb = e));\n }\n b = 1;\n e = d.S;\n f = d.width;\n g = d.height;\n if (e >= Ca && 13 > e)\n if (11 > e)\n (a = d.f.RGBA),\n (h = Math.abs(a.A)),\n (b &= h * (g - 1) + f <= a.size),\n (b &= h >= f * Dd[e]),\n (b &= null != a.eb);\n else {\n a = d.f.kb;\n h = (f + 1) / 2;\n m = (g + 1) / 2;\n k = Math.abs(a.fa);\n var l = Math.abs(a.Ab),\n n = Math.abs(a.Db),\n r = Math.abs(a.lb),\n q = r * (g - 1) + f;\n b &= k * (g - 1) + f <= a.Fd;\n b &= l * (m - 1) + h <= a.Cd;\n b &= n * (m - 1) + h <= a.Ed;\n b = b & (k >= f) & (l >= h) & (n >= h);\n b &= null != a.y;\n b &= null != a.f;\n b &= null != a.ea;\n 12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n }\n else b = 0;\n a = b ? 0 : 2;\n }\n }\n if (0 != a) return a;\n null != c && c.fd && (a = Bd(d));\n return a;\n }\n var xb = 64,\n Hd = [\n 0,\n 1,\n 3,\n 7,\n 15,\n 31,\n 63,\n 127,\n 255,\n 511,\n 1023,\n 2047,\n 4095,\n 8191,\n 16383,\n 32767,\n 65535,\n 131071,\n 262143,\n 524287,\n 1048575,\n 2097151,\n 4194303,\n 8388607,\n 16777215\n ],\n Gd = 24,\n ob = 32,\n Xb = 8,\n Id = [\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 2,\n 2,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7\n ];\n X(\"Predictor0\", \"PredictorAdd0\");\n self.Predictor0 = function() {\n return 4278190080;\n };\n self.Predictor1 = function(a) {\n return a;\n };\n self.Predictor2 = function(a, b, c) {\n return b[c + 0];\n };\n self.Predictor3 = function(a, b, c) {\n return b[c + 1];\n };\n self.Predictor4 = function(a, b, c) {\n return b[c - 1];\n };\n self.Predictor5 = function(a, b, c) {\n return aa(aa(a, b[c + 1]), b[c + 0]);\n };\n self.Predictor6 = function(a, b, c) {\n return aa(a, b[c - 1]);\n };\n self.Predictor7 = function(a, b, c) {\n return aa(a, b[c + 0]);\n };\n self.Predictor8 = function(a, b, c) {\n return aa(b[c - 1], b[c + 0]);\n };\n self.Predictor9 = function(a, b, c) {\n return aa(b[c + 0], b[c + 1]);\n };\n self.Predictor10 = function(a, b, c) {\n return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n };\n self.Predictor11 = function(a, b, c) {\n var d = b[c + 0];\n b = b[c - 1];\n return 0 >=\n Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n Ia(d & 255, a & 255, b & 255)\n ? d\n : a;\n };\n self.Predictor12 = function(a, b, c) {\n var d = b[c + 0];\n b = b[c - 1];\n return (\n ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n 16) |\n (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n sa((a & 255) + (d & 255) - (b & 255))) >>>\n 0\n );\n };\n self.Predictor13 = function(a, b, c) {\n var d = b[c - 1];\n a = aa(a, b[c + 0]);\n return (\n ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n 0\n );\n };\n var ee = self.PredictorAdd0;\n self.PredictorAdd1 = cc;\n X(\"Predictor2\", \"PredictorAdd2\");\n X(\"Predictor3\", \"PredictorAdd3\");\n X(\"Predictor4\", \"PredictorAdd4\");\n X(\"Predictor5\", \"PredictorAdd5\");\n X(\"Predictor6\", \"PredictorAdd6\");\n X(\"Predictor7\", \"PredictorAdd7\");\n X(\"Predictor8\", \"PredictorAdd8\");\n X(\"Predictor9\", \"PredictorAdd9\");\n X(\"Predictor10\", \"PredictorAdd10\");\n X(\"Predictor11\", \"PredictorAdd11\");\n X(\"Predictor12\", \"PredictorAdd12\");\n X(\"Predictor13\", \"PredictorAdd13\");\n var fe = self.PredictorAdd2;\n ec(\n \"ColorIndexInverseTransform\",\n \"MapARGB\",\n \"32b\",\n function(a) {\n return (a >> 8) & 255;\n },\n function(a) {\n return a;\n }\n );\n ec(\n \"VP8LColorIndexInverseTransformAlpha\",\n \"MapAlpha\",\n \"8b\",\n function(a) {\n return a;\n },\n function(a) {\n return (a >> 8) & 255;\n }\n );\n var rc = self.ColorIndexInverseTransform,\n ke = self.MapARGB,\n he = self.VP8LColorIndexInverseTransformAlpha,\n le = self.MapAlpha,\n pc,\n qc = (self.VP8LPredictorsAdd = []);\n qc.length = 16;\n (self.VP8LPredictors = []).length = 16;\n (self.VP8LPredictorsAdd_C = []).length = 16;\n (self.VP8LPredictors_C = []).length = 16;\n var Fb,\n sc,\n Gb,\n Hb,\n xc,\n uc,\n bd = V(511),\n cd = V(2041),\n dd = V(225),\n ed = V(767),\n ad = 0,\n Qb = cd,\n mb = dd,\n R = ed,\n U = bd,\n Ca = 0,\n Ua = 1,\n tc = 2,\n Va = 3,\n ya = 4,\n Db = 5,\n wc = 6,\n zb = 7,\n Ab = 8,\n Ja = 9,\n Bb = 10,\n pe = [2, 3, 7],\n oe = [3, 3, 11],\n Dc = [280, 256, 256, 256, 40],\n qe = [0, 1, 1, 1, 0],\n ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n de = [\n 24,\n 7,\n 23,\n 25,\n 40,\n 6,\n 39,\n 41,\n 22,\n 26,\n 38,\n 42,\n 56,\n 5,\n 55,\n 57,\n 21,\n 27,\n 54,\n 58,\n 37,\n 43,\n 72,\n 4,\n 71,\n 73,\n 20,\n 28,\n 53,\n 59,\n 70,\n 74,\n 36,\n 44,\n 88,\n 69,\n 75,\n 52,\n 60,\n 3,\n 87,\n 89,\n 19,\n 29,\n 86,\n 90,\n 35,\n 45,\n 68,\n 76,\n 85,\n 91,\n 51,\n 61,\n 104,\n 2,\n 103,\n 105,\n 18,\n 30,\n 102,\n 106,\n 34,\n 46,\n 84,\n 92,\n 67,\n 77,\n 101,\n 107,\n 50,\n 62,\n 120,\n 1,\n 119,\n 121,\n 83,\n 93,\n 17,\n 31,\n 100,\n 108,\n 66,\n 78,\n 118,\n 122,\n 33,\n 47,\n 117,\n 123,\n 49,\n 63,\n 99,\n 109,\n 82,\n 94,\n 0,\n 116,\n 124,\n 65,\n 79,\n 16,\n 32,\n 98,\n 110,\n 48,\n 115,\n 125,\n 81,\n 95,\n 64,\n 114,\n 126,\n 97,\n 111,\n 80,\n 113,\n 127,\n 96,\n 112\n ],\n me = [\n 2954,\n 2956,\n 2958,\n 2962,\n 2970,\n 2986,\n 3018,\n 3082,\n 3212,\n 3468,\n 3980,\n 5004\n ],\n ie = 8,\n Lb = [\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 17,\n 18,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 25,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 91,\n 93,\n 95,\n 96,\n 98,\n 100,\n 101,\n 102,\n 104,\n 106,\n 108,\n 110,\n 112,\n 114,\n 116,\n 118,\n 122,\n 124,\n 126,\n 128,\n 130,\n 132,\n 134,\n 136,\n 138,\n 140,\n 143,\n 145,\n 148,\n 151,\n 154,\n 157\n ],\n Mb = [\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 60,\n 62,\n 64,\n 66,\n 68,\n 70,\n 72,\n 74,\n 76,\n 78,\n 80,\n 82,\n 84,\n 86,\n 88,\n 90,\n 92,\n 94,\n 96,\n 98,\n 100,\n 102,\n 104,\n 106,\n 108,\n 110,\n 112,\n 114,\n 116,\n 119,\n 122,\n 125,\n 128,\n 131,\n 134,\n 137,\n 140,\n 143,\n 146,\n 149,\n 152,\n 155,\n 158,\n 161,\n 164,\n 167,\n 170,\n 173,\n 177,\n 181,\n 185,\n 189,\n 193,\n 197,\n 201,\n 205,\n 209,\n 213,\n 217,\n 221,\n 225,\n 229,\n 234,\n 239,\n 245,\n 249,\n 254,\n 259,\n 264,\n 269,\n 274,\n 279,\n 284\n ],\n oa = null,\n He = [\n [173, 148, 140, 0],\n [176, 155, 140, 135, 0],\n [180, 157, 141, 134, 130, 0],\n [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n ],\n Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n Fe = [\n [\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n ],\n [\n [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n ],\n [\n [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n ],\n [\n [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n ],\n [\n [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n ],\n [\n [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n ],\n [\n [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n ],\n [\n [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n ],\n [\n [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n ],\n [\n [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n ],\n [\n [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n ],\n [\n [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n ],\n [\n [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n ],\n [\n [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n ],\n [\n [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n ],\n [\n [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n ],\n [\n [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n ],\n [\n [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n ],\n [\n [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n ],\n [\n [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n ],\n [\n [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n ],\n [\n [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ]\n ],\n Ke = [\n [\n [231, 120, 48, 89, 115, 113, 120, 152, 112],\n [152, 179, 64, 126, 170, 118, 46, 70, 95],\n [175, 69, 143, 80, 85, 82, 72, 155, 103],\n [56, 58, 10, 171, 218, 189, 17, 13, 152],\n [114, 26, 17, 163, 44, 195, 21, 10, 173],\n [121, 24, 80, 195, 26, 62, 44, 64, 85],\n [144, 71, 10, 38, 171, 213, 144, 34, 26],\n [170, 46, 55, 19, 136, 160, 33, 206, 71],\n [63, 20, 8, 114, 114, 208, 12, 9, 226],\n [81, 40, 11, 96, 182, 84, 29, 16, 36]\n ],\n [\n [134, 183, 89, 137, 98, 101, 106, 165, 148],\n [72, 187, 100, 130, 157, 111, 32, 75, 80],\n [66, 102, 167, 99, 74, 62, 40, 234, 128],\n [41, 53, 9, 178, 241, 141, 26, 8, 107],\n [74, 43, 26, 146, 73, 166, 49, 23, 157],\n [65, 38, 105, 160, 51, 52, 31, 115, 128],\n [104, 79, 12, 27, 217, 255, 87, 17, 7],\n [87, 68, 71, 44, 114, 51, 15, 186, 23],\n [47, 41, 14, 110, 182, 183, 21, 17, 194],\n [66, 45, 25, 102, 197, 189, 23, 18, 22]\n ],\n [\n [88, 88, 147, 150, 42, 46, 45, 196, 205],\n [43, 97, 183, 117, 85, 38, 35, 179, 61],\n [39, 53, 200, 87, 26, 21, 43, 232, 171],\n [56, 34, 51, 104, 114, 102, 29, 93, 77],\n [39, 28, 85, 171, 58, 165, 90, 98, 64],\n [34, 22, 116, 206, 23, 34, 43, 166, 73],\n [107, 54, 32, 26, 51, 1, 81, 43, 31],\n [68, 25, 106, 22, 64, 171, 36, 225, 114],\n [34, 19, 21, 102, 132, 188, 16, 76, 124],\n [62, 18, 78, 95, 85, 57, 50, 48, 51]\n ],\n [\n [193, 101, 35, 159, 215, 111, 89, 46, 111],\n [60, 148, 31, 172, 219, 228, 21, 18, 111],\n [112, 113, 77, 85, 179, 255, 38, 120, 114],\n [40, 42, 1, 196, 245, 209, 10, 25, 109],\n [88, 43, 29, 140, 166, 213, 37, 43, 154],\n [61, 63, 30, 155, 67, 45, 68, 1, 209],\n [100, 80, 8, 43, 154, 1, 51, 26, 71],\n [142, 78, 78, 16, 255, 128, 34, 197, 171],\n [41, 40, 5, 102, 211, 183, 4, 1, 221],\n [51, 50, 17, 168, 209, 192, 23, 25, 82]\n ],\n [\n [138, 31, 36, 171, 27, 166, 38, 44, 229],\n [67, 87, 58, 169, 82, 115, 26, 59, 179],\n [63, 59, 90, 180, 59, 166, 93, 73, 154],\n [40, 40, 21, 116, 143, 209, 34, 39, 175],\n [47, 15, 16, 183, 34, 223, 49, 45, 183],\n [46, 17, 33, 183, 6, 98, 15, 32, 183],\n [57, 46, 22, 24, 128, 1, 54, 17, 37],\n [65, 32, 73, 115, 28, 128, 23, 128, 205],\n [40, 3, 9, 115, 51, 192, 18, 6, 223],\n [87, 37, 9, 115, 59, 77, 64, 21, 47]\n ],\n [\n [104, 55, 44, 218, 9, 54, 53, 130, 226],\n [64, 90, 70, 205, 40, 41, 23, 26, 57],\n [54, 57, 112, 184, 5, 41, 38, 166, 213],\n [30, 34, 26, 133, 152, 116, 10, 32, 134],\n [39, 19, 53, 221, 26, 114, 32, 73, 255],\n [31, 9, 65, 234, 2, 15, 1, 118, 73],\n [75, 32, 12, 51, 192, 255, 160, 43, 51],\n [88, 31, 35, 67, 102, 85, 55, 186, 85],\n [56, 21, 23, 111, 59, 205, 45, 37, 192],\n [55, 38, 70, 124, 73, 102, 1, 34, 98]\n ],\n [\n [125, 98, 42, 88, 104, 85, 117, 175, 82],\n [95, 84, 53, 89, 128, 100, 113, 101, 45],\n [75, 79, 123, 47, 51, 128, 81, 171, 1],\n [57, 17, 5, 71, 102, 57, 53, 41, 49],\n [38, 33, 13, 121, 57, 73, 26, 1, 85],\n [41, 10, 67, 138, 77, 110, 90, 47, 114],\n [115, 21, 2, 10, 102, 255, 166, 23, 6],\n [101, 29, 16, 10, 85, 128, 101, 196, 26],\n [57, 18, 10, 102, 102, 213, 34, 20, 43],\n [117, 20, 15, 36, 163, 128, 68, 1, 26]\n ],\n [\n [102, 61, 71, 37, 34, 53, 31, 243, 192],\n [69, 60, 71, 38, 73, 119, 28, 222, 37],\n [68, 45, 128, 34, 1, 47, 11, 245, 171],\n [62, 17, 19, 70, 146, 85, 55, 62, 70],\n [37, 43, 37, 154, 100, 163, 85, 160, 1],\n [63, 9, 92, 136, 28, 64, 32, 201, 85],\n [75, 15, 9, 9, 64, 255, 184, 119, 16],\n [86, 6, 28, 5, 64, 255, 25, 248, 1],\n [56, 8, 17, 132, 137, 255, 55, 116, 128],\n [58, 15, 20, 82, 135, 57, 26, 121, 40]\n ],\n [\n [164, 50, 31, 137, 154, 133, 25, 35, 218],\n [51, 103, 44, 131, 131, 123, 31, 6, 158],\n [86, 40, 64, 135, 148, 224, 45, 183, 128],\n [22, 26, 17, 131, 240, 154, 14, 1, 209],\n [45, 16, 21, 91, 64, 222, 7, 1, 197],\n [56, 21, 39, 155, 60, 138, 23, 102, 213],\n [83, 12, 13, 54, 192, 255, 68, 47, 28],\n [85, 26, 85, 85, 128, 128, 32, 146, 171],\n [18, 11, 7, 63, 144, 171, 4, 4, 246],\n [35, 27, 10, 146, 174, 171, 12, 26, 128]\n ],\n [\n [190, 80, 35, 99, 180, 80, 126, 54, 45],\n [85, 126, 47, 87, 176, 51, 41, 20, 32],\n [101, 75, 128, 139, 118, 146, 116, 128, 85],\n [56, 41, 15, 176, 236, 85, 37, 9, 62],\n [71, 30, 17, 119, 118, 255, 17, 18, 138],\n [101, 38, 60, 138, 55, 70, 43, 26, 142],\n [146, 36, 19, 30, 171, 255, 97, 27, 20],\n [138, 45, 61, 62, 219, 1, 81, 188, 64],\n [32, 41, 20, 117, 151, 142, 20, 21, 163],\n [112, 19, 12, 61, 195, 128, 48, 4, 24]\n ]\n ],\n Ee = [\n [\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ]\n ],\n Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n Nc,\n Y = [],\n W = [],\n ka = [],\n Za,\n fd,\n Nb,\n pa,\n Ob,\n Xc,\n Tc,\n Yc,\n Uc,\n Zc,\n Vc,\n $c,\n Wc,\n Rc,\n Pc,\n Sc,\n Qc,\n re = 1,\n Cc = 2,\n ia = [],\n za,\n vc,\n fc,\n Fc,\n P = [];\n va(\"UpsampleRgbLinePair\", Ga, 3);\n va(\"UpsampleBgrLinePair\", Tb, 3);\n va(\"UpsampleRgbaLinePair\", wd, 4);\n va(\"UpsampleBgraLinePair\", vd, 4);\n va(\"UpsampleArgbLinePair\", ud, 4);\n va(\"UpsampleRgba4444LinePair\", td, 2);\n va(\"UpsampleRgb565LinePair\", sd, 2);\n var Mf = self.UpsampleRgbLinePair,\n Nf = self.UpsampleBgrLinePair,\n nd = self.UpsampleRgbaLinePair,\n od = self.UpsampleBgraLinePair,\n pd = self.UpsampleArgbLinePair,\n qd = self.UpsampleRgba4444LinePair,\n Of = self.UpsampleRgb565LinePair,\n Wa = 16,\n Ba = 1 << (Wa - 1),\n ta = -227,\n Eb = 482,\n rd = 6,\n Pf = (256 << rd) - 1,\n jc = 0,\n Yd = V(256),\n ae = V(256),\n $d = V(256),\n Zd = V(256),\n be = V(Eb - ta),\n ce = V(Eb - ta);\n la(\"YuvToRgbRow\", Ga, 3);\n la(\"YuvToBgrRow\", Tb, 3);\n la(\"YuvToRgbaRow\", wd, 4);\n la(\"YuvToBgraRow\", vd, 4);\n la(\"YuvToArgbRow\", ud, 4);\n la(\"YuvToRgba4444Row\", td, 2);\n la(\"YuvToRgb565Row\", sd, 2);\n var zd = [\n 0,\n 4,\n 8,\n 12,\n 128,\n 132,\n 136,\n 140,\n 256,\n 260,\n 264,\n 268,\n 384,\n 388,\n 392,\n 396\n ],\n Ya = [0, 2, 8],\n Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n Ne = 1;\n this.WebPDecodeRGBA = function(a, b, c, d, e) {\n var f = Ua;\n var g = new Cf(),\n h = new Cb();\n g.ba = h;\n h.S = f;\n h.width = [h.width];\n h.height = [h.height];\n var k = h.width;\n var l = h.height,\n m = new Td();\n if (null == m || null == a) var n = 2;\n else\n x(null != m),\n (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n 0 != n\n ? (k = 0)\n : (null != k && (k[0] = m.width[0]),\n null != l && (l[0] = m.height[0]),\n (k = 1));\n if (k) {\n h.width = h.width[0];\n h.height = h.height[0];\n null != d && (d[0] = h.width);\n null != e && (e[0] = h.height);\n b: {\n d = new Oa();\n e = new md();\n e.data = a;\n e.w = b;\n e.ha = c;\n e.kd = 1;\n b = [0];\n x(null != e);\n a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n (0 == a || 7 == a) && b[0] && (a = 4);\n b = a;\n if (0 == b) {\n x(null != g);\n d.data = e.data;\n d.w = e.w + e.offset;\n d.ha = e.ha - e.offset;\n d.put = kc;\n d.ac = gc;\n d.bc = lc;\n d.ma = g;\n if (e.xa) {\n a = Bc();\n if (null == a) {\n g = 1;\n break b;\n }\n if (te(a, d)) {\n b = Cd(d.width, d.height, g.Oa, g.ba);\n if ((d = 0 == b)) {\n c: {\n d = a;\n d: for (;;) {\n if (null == d) {\n d = 0;\n break c;\n }\n x(null != d.s.yc);\n x(null != d.s.Ya);\n x(0 < d.s.Wb);\n c = d.l;\n x(null != c);\n e = c.ma;\n x(null != e);\n if (0 != d.xb) {\n d.ca = e.ba;\n d.tb = e.tb;\n x(null != d.ca);\n if (!hc(e.Oa, c, Va)) {\n d.a = 2;\n break d;\n }\n if (!Ec(d, c.width)) break d;\n if (c.da) break d;\n (c.da || hb(d.ca.S)) && Aa();\n 11 > d.ca.S ||\n (alert(\"todo:WebPInitConvertARGBToYUV\"),\n null != d.ca.f.kb.F && Aa());\n if (\n d.Pb &&\n 0 < d.s.ua &&\n null == d.s.vb.X &&\n !Zb(d.s.vb, d.s.Wa.Xa)\n ) {\n d.a = 1;\n break d;\n }\n d.xb = 0;\n }\n if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n e.Dc = d.Ma;\n d = 1;\n break c;\n }\n x(0 != d.a);\n d = 0;\n }\n d = !d;\n }\n d && (b = a.a);\n } else b = a.a;\n } else {\n a = new Ce();\n if (null == a) {\n g = 1;\n break b;\n }\n a.Fa = e.na;\n a.P = e.P;\n a.qc = e.Sa;\n if (Kc(a, d)) {\n if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n a.Aa = 0;\n c = g.Oa;\n e = a;\n x(null != e);\n if (null != c) {\n k = c.Md;\n k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n if (0 < k) {\n for (l = m = 0; 4 > l; ++l)\n (n = e.pb[l]),\n 12 > n.lc &&\n (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n (m |= n.ia);\n m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n }\n e.Ga = c.Id;\n 100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n }\n Me(a, d) || (b = a.a);\n }\n } else b = a.a;\n }\n 0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n }\n g = b;\n }\n f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n } else f = null;\n return f;\n };\n var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n };\n new _WebPDecoder();\n\n /** @license\n * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n function memcmp(data, data_off, str, size) {\n for (var i = 0; i < size; i++)\n if (data[data_off + i] != str.charCodeAt(i)) return true;\n return false;\n }\n\n function GetTag(data, data_off) {\n var str = \"\";\n for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n return str;\n }\n\n function GetLE16(data, data_off) {\n return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n }\n\n function GetLE24(data, data_off) {\n return (\n ((data[data_off + 0] << 0) |\n (data[data_off + 1] << 8) |\n (data[data_off + 2] << 16)) >>>\n 0\n );\n }\n\n function GetLE32(data, data_off) {\n return (\n ((data[data_off + 0] << 0) |\n (data[data_off + 1] << 8) |\n (data[data_off + 2] << 16) |\n (data[data_off + 3] << 24)) >>>\n 0\n );\n }\n\n function WebPRiffParser(src, src_off) {\n var imagearray = {};\n var i = 0;\n var alpha_chunk = false;\n var alpha_size = 0;\n var alpha_offset = 0;\n imagearray[\"frames\"] = [];\n if (memcmp(src, src_off, \"RIFF\", 4)) return;\n src_off += 4;\n var riff_size = GetLE32(src, src_off) + 8;\n src_off += 8;\n\n while (src_off < src.length) {\n var fourcc = GetTag(src, src_off);\n src_off += 4;\n\n var payload_size = GetLE32(src, src_off);\n src_off += 4;\n var payload_size_padded = payload_size + (payload_size & 1);\n\n switch (fourcc) {\n case \"VP8 \":\n case \"VP8L\":\n if (typeof imagearray[\"frames\"][i] === \"undefined\")\n imagearray[\"frames\"][i] = {};\n var obj = imagearray[\"frames\"][i];\n var height = [0];\n var width = [0];\n obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n obj[\"src_size\"] = alpha_size + payload_size + 8;\n //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n i++;\n if (alpha_chunk) {\n alpha_chunk = false;\n alpha_size = 0;\n alpha_offset = 0;\n }\n break;\n case \"VP8X\":\n var obj = (imagearray[\"header\"] = {});\n var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n var src_off_ = src_off + 4;\n var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n src_off_ += 3;\n var canvas_height = (obj[\"canvas_height\"] =\n 1 + GetLE24(src, src_off_));\n src_off_ += 3;\n break;\n case \"ALPH\":\n alpha_chunk = true;\n alpha_size = payload_size_padded + 8;\n alpha_offset = src_off - 8;\n break;\n\n case \"ANIM\":\n var obj = imagearray[\"header\"];\n var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n src_off_ = src_off + 4;\n\n var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n src_off_ += 2;\n break;\n case \"ANMF\":\n var offset_x = 0,\n offset_y = 0,\n width = 0,\n height = 0,\n duration = 0,\n blend = 0,\n dispose = 0,\n temp = 0;\n var obj = (imagearray[\"frames\"][i] = {});\n obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n src_off += 3;\n obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n src_off += 3;\n obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n src_off += 3;\n obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n src_off += 3;\n obj[\"duration\"] = duration = GetLE24(src, src_off);\n src_off += 3;\n temp = src[src_off++];\n obj[\"dispose\"] = dispose = temp & 1;\n obj[\"blend\"] = blend = (temp >> 1) & 1;\n break;\n default:\n }\n if (fourcc != \"ANMF\") src_off += payload_size_padded;\n }\n return imagearray;\n }\n\n var height = [0];\n var width = [0];\n var pixels = [];\n var webpdecoder = new _WebPDecoder();\n\n var response = imageData;\n var imagearray = WebPRiffParser(response, 0);\n imagearray[\"response\"] = response;\n imagearray[\"rgbaoutput\"] = true;\n imagearray[\"dataurl\"] = false;\n\n var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n if (header) {\n header[\"loop_counter\"] = header[\"loop_count\"];\n height = [header[\"canvas_height\"]];\n width = [header[\"canvas_width\"]];\n\n var blend = false;\n for (var f = 0; f < frames.length; f++)\n if (frames[f][\"blend\"] == 0) {\n blend = true;\n break;\n }\n }\n\n var frame = frames[0];\n var rgba = webpdecoder.WebPDecodeRGBA(\n response,\n frame[\"src_off\"],\n frame[\"src_size\"],\n width,\n height\n );\n frame[\"rgba\"] = rgba;\n frame[\"imgwidth\"] = width[0];\n frame[\"imgheight\"] = height[0];\n\n for (var i = 0; i < width[0] * height[0] * 4; i++) {\n pixels[i] = rgba[i];\n }\n\n this.width = width;\n this.height = height;\n this.data = pixels;\n return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /*\n * @see http://www.w3.org/TR/PNG-Chunks.html\n *\n Color Allowed Interpretation\n Type Bit Depths\n\n 0 1,2,4,8,16 Each pixel is a grayscale sample.\n\n 2 8,16 Each pixel is an R,G,B triple.\n\n 3 1,2,4,8 Each pixel is a palette index;\n a PLTE chunk must appear.\n\n 4 8,16 Each pixel is a grayscale sample,\n followed by an alpha sample.\n\n 6 8,16 Each pixel is an R,G,B triple,\n followed by an alpha sample.\n */\n\n /*\n * PNG filter method types\n *\n * @see http://www.w3.org/TR/PNG-Filters.html\n * @see http://www.libpng.org/pub/png/book/chapter09.html\n *\n * This is what the value 'Predictor' in decode params relates to\n *\n * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n *\n 0 None\n 1 Sub\n 2 Up\n 3 Average\n 4 Paeth\n */\n\n var canCompress = function(value) {\n return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n };\n\n var hasCompressionJS = function() {\n return typeof zlibSync === \"function\";\n };\n var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n var level = 4;\n var filter_method = filterUp;\n\n switch (compression) {\n case jsPDFAPI.image_compression.FAST:\n level = 1;\n filter_method = filterSub;\n break;\n\n case jsPDFAPI.image_compression.MEDIUM:\n level = 6;\n filter_method = filterAverage;\n break;\n\n case jsPDFAPI.image_compression.SLOW:\n level = 9;\n filter_method = filterPaeth;\n break;\n }\n\n bytes = applyPngFilterMethod(\n bytes,\n lineLength,\n colorsPerPixel,\n filter_method\n );\n var dat = zlibSync(bytes, { level: level });\n return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n };\n\n var applyPngFilterMethod = function(\n bytes,\n lineLength,\n colorsPerPixel,\n filter_method\n ) {\n var lines = bytes.length / lineLength,\n result = new Uint8Array(bytes.length + lines),\n filter_methods = getFilterMethods(),\n line,\n prevLine,\n offset;\n\n for (var i = 0; i < lines; i += 1) {\n offset = i * lineLength;\n line = bytes.subarray(offset, offset + lineLength);\n\n if (filter_method) {\n result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n } else {\n var len = filter_methods.length,\n results = [];\n\n for (var j; j < len; j += 1) {\n results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n }\n\n var ind = getIndexOfSmallestSum(results.concat());\n\n result.set(results[ind], offset + i);\n }\n\n prevLine = line;\n }\n\n return result;\n };\n\n var filterNone = function(line) {\n /*var result = new Uint8Array(line.length + 1);\n result[0] = 0;\n result.set(line, 1);*/\n\n var result = Array.apply([], line);\n result.unshift(0);\n\n return result;\n };\n\n var filterSub = function(line, colorsPerPixel) {\n var result = [],\n len = line.length,\n left;\n\n result[0] = 1;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var filterUp = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n up;\n\n result[0] = 2;\n\n for (var i = 0; i < len; i += 1) {\n up = (prevLine && prevLine[i]) || 0;\n result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var filterAverage = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n left,\n up;\n\n result[0] = 3;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n up = (prevLine && prevLine[i]) || 0;\n result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n }\n\n return result;\n };\n\n var filterPaeth = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n left,\n up,\n upLeft,\n paeth;\n\n result[0] = 4;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n up = (prevLine && prevLine[i]) || 0;\n upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n paeth = paethPredictor(left, up, upLeft);\n result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var paethPredictor = function(left, up, upLeft) {\n if (left === up && up === upLeft) {\n return left;\n }\n var pLeft = Math.abs(up - upLeft),\n pUp = Math.abs(left - upLeft),\n pUpLeft = Math.abs(left + up - upLeft - upLeft);\n return pLeft <= pUp && pLeft <= pUpLeft\n ? left\n : pUp <= pUpLeft\n ? up\n : upLeft;\n };\n\n var getFilterMethods = function() {\n return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n };\n\n var getIndexOfSmallestSum = function(arrays) {\n var sum = arrays.map(function(value) {\n return value.reduce(function(pv, cv) {\n return pv + Math.abs(cv);\n }, 0);\n });\n return sum.indexOf(Math.min.apply(null, sum));\n };\n\n var getPredictorFromCompression = function(compression) {\n var predictor;\n switch (compression) {\n case jsPDFAPI.image_compression.FAST:\n predictor = 11;\n break;\n\n case jsPDFAPI.image_compression.MEDIUM:\n predictor = 13;\n break;\n\n case jsPDFAPI.image_compression.SLOW:\n predictor = 14;\n break;\n\n default:\n predictor = 12;\n break;\n }\n return predictor;\n };\n\n /**\n * @name processPNG\n * @function\n * @ignore\n */\n jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n \"use strict\";\n\n var colorSpace,\n filter = this.decode.FLATE_DECODE,\n bitsPerComponent,\n image,\n decodeParameters = \"\",\n trns,\n colors,\n pal,\n smask,\n pixels,\n len,\n alphaData,\n imgData,\n hasColors,\n pixel,\n i,\n n;\n\n if (this.__addimage__.isArrayBuffer(imageData))\n imageData = new Uint8Array(imageData);\n\n if (this.__addimage__.isArrayBufferView(imageData)) {\n image = new PNG(imageData);\n imageData = image.imgData;\n bitsPerComponent = image.bits;\n colorSpace = image.colorSpace;\n colors = image.colors;\n\n /*\n * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n *\n * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n *\n * Extract alpha to create two separate images, using the alpha as a sMask\n */\n if ([4, 6].indexOf(image.colorType) !== -1) {\n /*\n * processes 8 bit RGBA and grayscale + alpha images\n */\n if (image.bits === 8) {\n pixels =\n image.pixelBitlength == 32\n ? new Uint32Array(image.decodePixels().buffer)\n : image.pixelBitlength == 16\n ? new Uint16Array(image.decodePixels().buffer)\n : new Uint8Array(image.decodePixels().buffer);\n len = pixels.length;\n imgData = new Uint8Array(len * image.colors);\n alphaData = new Uint8Array(len);\n var pDiff = image.pixelBitlength - image.bits;\n i = 0;\n n = 0;\n var pbl;\n\n for (; i < len; i++) {\n pixel = pixels[i];\n pbl = 0;\n\n while (pbl < pDiff) {\n imgData[n++] = (pixel >>> pbl) & 0xff;\n pbl = pbl + image.bits;\n }\n\n alphaData[i] = (pixel >>> pbl) & 0xff;\n }\n }\n\n /*\n * processes 16 bit RGBA and grayscale + alpha images\n */\n if (image.bits === 16) {\n pixels = new Uint32Array(image.decodePixels().buffer);\n len = pixels.length;\n imgData = new Uint8Array(\n len * (32 / image.pixelBitlength) * image.colors\n );\n alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n hasColors = image.colors > 1;\n i = 0;\n n = 0;\n var a = 0;\n\n while (i < len) {\n pixel = pixels[i++];\n\n imgData[n++] = (pixel >>> 0) & 0xff;\n\n if (hasColors) {\n imgData[n++] = (pixel >>> 16) & 0xff;\n\n pixel = pixels[i++];\n imgData[n++] = (pixel >>> 0) & 0xff;\n }\n\n alphaData[a++] = (pixel >>> 16) & 0xff;\n }\n bitsPerComponent = 8;\n }\n\n if (canCompress(compression)) {\n imageData = compressBytes(\n imgData,\n image.width * image.colors,\n image.colors,\n compression\n );\n smask = compressBytes(alphaData, image.width, 1, compression);\n } else {\n imageData = imgData;\n smask = alphaData;\n filter = undefined;\n }\n }\n\n /*\n * Indexed png. Each pixel is a palette index.\n */\n if (image.colorType === 3) {\n colorSpace = this.color_spaces.INDEXED;\n pal = image.palette;\n\n if (image.transparency.indexed) {\n var trans = image.transparency.indexed;\n var total = 0;\n i = 0;\n len = trans.length;\n\n for (; i < len; ++i) {\n total += trans[i];\n }\n\n total = total / 255;\n\n /*\n * a single color is specified as 100% transparent (0),\n * so we set trns to use a /Mask with that index\n */\n if (total === len - 1 && trans.indexOf(0) !== -1) {\n trns = [trans.indexOf(0)];\n\n /*\n * there's more than one colour within the palette that specifies\n * a transparency value less than 255, so we unroll the pixels to create an image sMask\n */\n } else if (total !== len) {\n pixels = image.decodePixels();\n alphaData = new Uint8Array(pixels.length);\n i = 0;\n len = pixels.length;\n\n for (; i < len; i++) {\n alphaData[i] = trans[pixels[i]];\n }\n\n smask = compressBytes(alphaData, image.width, 1);\n }\n }\n }\n\n var predictor = getPredictorFromCompression(compression);\n\n if (filter === this.decode.FLATE_DECODE) {\n decodeParameters = \"/Predictor \" + predictor + \" \";\n }\n decodeParameters +=\n \"/Colors \" +\n colors +\n \" /BitsPerComponent \" +\n bitsPerComponent +\n \" /Columns \" +\n image.width;\n\n if (\n this.__addimage__.isArrayBuffer(imageData) ||\n this.__addimage__.isArrayBufferView(imageData)\n ) {\n imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n }\n\n if (\n (smask && this.__addimage__.isArrayBuffer(smask)) ||\n this.__addimage__.isArrayBufferView(smask)\n ) {\n smask = this.__addimage__.arrayBufferToBinaryString(smask);\n }\n\n return {\n alias: alias,\n data: imageData,\n index: index,\n filter: filter,\n decodeParameters: decodeParameters,\n transparency: trns,\n palette: pal,\n sMask: smask,\n predictor: predictor,\n width: image.width,\n height: image.height,\n bitsPerComponent: bitsPerComponent,\n colorSpace: colorSpace\n };\n }\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n var reader = new GifReader(imageData);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = [];\n\n reader.decodeAndBlitFrameRGBA(0, pixels);\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n\n jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n var reader = new BmpDecoder(imageData, false);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = reader.getData();\n\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n var reader = new WebPDecoder(imageData, false);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = reader.getData();\n\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @name processRGBA\n * @function\n *\n * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n * RGBA array data can be obtained from DOM canvas getImageData.\n * @ignore\n */\n jsPDFAPI.processRGBA = function(imageData, index, alias) {\n \"use strict\";\n\n var imagePixels = imageData.data;\n var length = imagePixels.length;\n // jsPDF takes alpha data separately so extract that.\n var rgbOut = new Uint8Array((length / 4) * 3);\n var alphaOut = new Uint8Array(length / 4);\n var outIndex = 0;\n var alphaIndex = 0;\n\n for (var i = 0; i < length; i += 4) {\n var r = imagePixels[i];\n var g = imagePixels[i + 1];\n var b = imagePixels[i + 2];\n var alpha = imagePixels[i + 3];\n rgbOut[outIndex++] = r;\n rgbOut[outIndex++] = g;\n rgbOut[outIndex++] = b;\n alphaOut[alphaIndex++] = alpha;\n }\n\n var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n return {\n alpha: alphaData,\n data: rgbData,\n index: index,\n alias: alias,\n colorSpace: \"DeviceRGB\",\n bitsPerComponent: 8,\n width: imageData.width,\n height: imageData.height\n };\n };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Add Language Tag to the generated PDF\n *\n * @name setLanguage\n * @function\n * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n * @returns {jsPDF}\n * @example\n * var doc = new jsPDF()\n * doc.text(10, 10, 'This is a test')\n * doc.setLanguage(\"en-US\")\n * doc.save('english.pdf')\n */\n jsPDFAPI.setLanguage = function(langCode) {\n \"use strict\";\n\n var langCodes = {\n af: \"Afrikaans\",\n sq: \"Albanian\",\n ar: \"Arabic (Standard)\",\n \"ar-DZ\": \"Arabic (Algeria)\",\n \"ar-BH\": \"Arabic (Bahrain)\",\n \"ar-EG\": \"Arabic (Egypt)\",\n \"ar-IQ\": \"Arabic (Iraq)\",\n \"ar-JO\": \"Arabic (Jordan)\",\n \"ar-KW\": \"Arabic (Kuwait)\",\n \"ar-LB\": \"Arabic (Lebanon)\",\n \"ar-LY\": \"Arabic (Libya)\",\n \"ar-MA\": \"Arabic (Morocco)\",\n \"ar-OM\": \"Arabic (Oman)\",\n \"ar-QA\": \"Arabic (Qatar)\",\n \"ar-SA\": \"Arabic (Saudi Arabia)\",\n \"ar-SY\": \"Arabic (Syria)\",\n \"ar-TN\": \"Arabic (Tunisia)\",\n \"ar-AE\": \"Arabic (U.A.E.)\",\n \"ar-YE\": \"Arabic (Yemen)\",\n an: \"Aragonese\",\n hy: \"Armenian\",\n as: \"Assamese\",\n ast: \"Asturian\",\n az: \"Azerbaijani\",\n eu: \"Basque\",\n be: \"Belarusian\",\n bn: \"Bengali\",\n bs: \"Bosnian\",\n br: \"Breton\",\n bg: \"Bulgarian\",\n my: \"Burmese\",\n ca: \"Catalan\",\n ch: \"Chamorro\",\n ce: \"Chechen\",\n zh: \"Chinese\",\n \"zh-HK\": \"Chinese (Hong Kong)\",\n \"zh-CN\": \"Chinese (PRC)\",\n \"zh-SG\": \"Chinese (Singapore)\",\n \"zh-TW\": \"Chinese (Taiwan)\",\n cv: \"Chuvash\",\n co: \"Corsican\",\n cr: \"Cree\",\n hr: \"Croatian\",\n cs: \"Czech\",\n da: \"Danish\",\n nl: \"Dutch (Standard)\",\n \"nl-BE\": \"Dutch (Belgian)\",\n en: \"English\",\n \"en-AU\": \"English (Australia)\",\n \"en-BZ\": \"English (Belize)\",\n \"en-CA\": \"English (Canada)\",\n \"en-IE\": \"English (Ireland)\",\n \"en-JM\": \"English (Jamaica)\",\n \"en-NZ\": \"English (New Zealand)\",\n \"en-PH\": \"English (Philippines)\",\n \"en-ZA\": \"English (South Africa)\",\n \"en-TT\": \"English (Trinidad & Tobago)\",\n \"en-GB\": \"English (United Kingdom)\",\n \"en-US\": \"English (United States)\",\n \"en-ZW\": \"English (Zimbabwe)\",\n eo: \"Esperanto\",\n et: \"Estonian\",\n fo: \"Faeroese\",\n fj: \"Fijian\",\n fi: \"Finnish\",\n fr: \"French (Standard)\",\n \"fr-BE\": \"French (Belgium)\",\n \"fr-CA\": \"French (Canada)\",\n \"fr-FR\": \"French (France)\",\n \"fr-LU\": \"French (Luxembourg)\",\n \"fr-MC\": \"French (Monaco)\",\n \"fr-CH\": \"French (Switzerland)\",\n fy: \"Frisian\",\n fur: \"Friulian\",\n gd: \"Gaelic (Scots)\",\n \"gd-IE\": \"Gaelic (Irish)\",\n gl: \"Galacian\",\n ka: \"Georgian\",\n de: \"German (Standard)\",\n \"de-AT\": \"German (Austria)\",\n \"de-DE\": \"German (Germany)\",\n \"de-LI\": \"German (Liechtenstein)\",\n \"de-LU\": \"German (Luxembourg)\",\n \"de-CH\": \"German (Switzerland)\",\n el: \"Greek\",\n gu: \"Gujurati\",\n ht: \"Haitian\",\n he: \"Hebrew\",\n hi: \"Hindi\",\n hu: \"Hungarian\",\n is: \"Icelandic\",\n id: \"Indonesian\",\n iu: \"Inuktitut\",\n ga: \"Irish\",\n it: \"Italian (Standard)\",\n \"it-CH\": \"Italian (Switzerland)\",\n ja: \"Japanese\",\n kn: \"Kannada\",\n ks: \"Kashmiri\",\n kk: \"Kazakh\",\n km: \"Khmer\",\n ky: \"Kirghiz\",\n tlh: \"Klingon\",\n ko: \"Korean\",\n \"ko-KP\": \"Korean (North Korea)\",\n \"ko-KR\": \"Korean (South Korea)\",\n la: \"Latin\",\n lv: \"Latvian\",\n lt: \"Lithuanian\",\n lb: \"Luxembourgish\",\n mk: \"North Macedonia\",\n ms: \"Malay\",\n ml: \"Malayalam\",\n mt: \"Maltese\",\n mi: \"Maori\",\n mr: \"Marathi\",\n mo: \"Moldavian\",\n nv: \"Navajo\",\n ng: \"Ndonga\",\n ne: \"Nepali\",\n no: \"Norwegian\",\n nb: \"Norwegian (Bokmal)\",\n nn: \"Norwegian (Nynorsk)\",\n oc: \"Occitan\",\n or: \"Oriya\",\n om: \"Oromo\",\n fa: \"Persian\",\n \"fa-IR\": \"Persian/Iran\",\n pl: \"Polish\",\n pt: \"Portuguese\",\n \"pt-BR\": \"Portuguese (Brazil)\",\n pa: \"Punjabi\",\n \"pa-IN\": \"Punjabi (India)\",\n \"pa-PK\": \"Punjabi (Pakistan)\",\n qu: \"Quechua\",\n rm: \"Rhaeto-Romanic\",\n ro: \"Romanian\",\n \"ro-MO\": \"Romanian (Moldavia)\",\n ru: \"Russian\",\n \"ru-MO\": \"Russian (Moldavia)\",\n sz: \"Sami (Lappish)\",\n sg: \"Sango\",\n sa: \"Sanskrit\",\n sc: \"Sardinian\",\n sd: \"Sindhi\",\n si: \"Singhalese\",\n sr: \"Serbian\",\n sk: \"Slovak\",\n sl: \"Slovenian\",\n so: \"Somani\",\n sb: \"Sorbian\",\n es: \"Spanish\",\n \"es-AR\": \"Spanish (Argentina)\",\n \"es-BO\": \"Spanish (Bolivia)\",\n \"es-CL\": \"Spanish (Chile)\",\n \"es-CO\": \"Spanish (Colombia)\",\n \"es-CR\": \"Spanish (Costa Rica)\",\n \"es-DO\": \"Spanish (Dominican Republic)\",\n \"es-EC\": \"Spanish (Ecuador)\",\n \"es-SV\": \"Spanish (El Salvador)\",\n \"es-GT\": \"Spanish (Guatemala)\",\n \"es-HN\": \"Spanish (Honduras)\",\n \"es-MX\": \"Spanish (Mexico)\",\n \"es-NI\": \"Spanish (Nicaragua)\",\n \"es-PA\": \"Spanish (Panama)\",\n \"es-PY\": \"Spanish (Paraguay)\",\n \"es-PE\": \"Spanish (Peru)\",\n \"es-PR\": \"Spanish (Puerto Rico)\",\n \"es-ES\": \"Spanish (Spain)\",\n \"es-UY\": \"Spanish (Uruguay)\",\n \"es-VE\": \"Spanish (Venezuela)\",\n sx: \"Sutu\",\n sw: \"Swahili\",\n sv: \"Swedish\",\n \"sv-FI\": \"Swedish (Finland)\",\n \"sv-SV\": \"Swedish (Sweden)\",\n ta: \"Tamil\",\n tt: \"Tatar\",\n te: \"Teluga\",\n th: \"Thai\",\n tig: \"Tigre\",\n ts: \"Tsonga\",\n tn: \"Tswana\",\n tr: \"Turkish\",\n tk: \"Turkmen\",\n uk: \"Ukrainian\",\n hsb: \"Upper Sorbian\",\n ur: \"Urdu\",\n ve: \"Venda\",\n vi: \"Vietnamese\",\n vo: \"Volapuk\",\n wa: \"Walloon\",\n cy: \"Welsh\",\n xh: \"Xhosa\",\n ji: \"Yiddish\",\n zu: \"Zulu\"\n };\n\n if (this.internal.languageSettings === undefined) {\n this.internal.languageSettings = {};\n this.internal.languageSettings.isSubscribed = false;\n }\n\n if (langCodes[langCode] !== undefined) {\n this.internal.languageSettings.languageCode = langCode;\n if (this.internal.languageSettings.isSubscribed === false) {\n this.internal.events.subscribe(\"putCatalog\", function() {\n this.internal.write(\n \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n );\n });\n this.internal.languageSettings.isSubscribed = true;\n }\n }\n return this;\n };\n})(jsPDF.API);\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * 2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n \"use strict\";\n /**\n * Returns an array of length matching length of the 'word' string, with each\n * cell occupied by the width of the char in that position.\n *\n * @name getCharWidthsArray\n * @function\n * @param {string} text\n * @param {Object} options\n * @returns {Array}\n */\n var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n options = options || {};\n\n var activeFont = options.font || this.internal.getFont();\n var fontSize = options.fontSize || this.internal.getFontSize();\n var charSpace = options.charSpace || this.internal.getCharSpace();\n\n var widths = options.widths\n ? options.widths\n : activeFont.metadata.Unicode.widths;\n var widthsFractionOf = widths.fof ? widths.fof : 1;\n var kerning = options.kerning\n ? options.kerning\n : activeFont.metadata.Unicode.kerning;\n var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n var doKerning = options.doKerning === false ? false : true;\n var kerningValue = 0;\n\n var i;\n var length = text.length;\n var char_code;\n var prior_char_code = 0; //for kerning\n var default_char_width = widths[0] || widthsFractionOf;\n var output = [];\n\n for (i = 0; i < length; i++) {\n char_code = text.charCodeAt(i);\n\n if (typeof activeFont.metadata.widthOfString === \"function\") {\n output.push(\n (activeFont.metadata.widthOfGlyph(\n activeFont.metadata.characterToGlyph(char_code)\n ) +\n charSpace * (1000 / fontSize) || 0) / 1000\n );\n } else {\n if (\n doKerning &&\n typeof kerning[char_code] === \"object\" &&\n !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n ) {\n kerningValue =\n kerning[char_code][prior_char_code] / kerningFractionOf;\n } else {\n kerningValue = 0;\n }\n output.push(\n (widths[char_code] || default_char_width) / widthsFractionOf +\n kerningValue\n );\n }\n prior_char_code = char_code;\n }\n\n return output;\n });\n\n /**\n * Returns a widths of string in a given font, if the font size is set as 1 point.\n *\n * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n * of the string will be that much.\n *\n * Multiply by font size to get actual width in *points*\n * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n *\n * @name getStringUnitWidth\n * @public\n * @function\n * @param {string} text\n * @param {string} options\n * @returns {number} result\n */\n var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n options = options || {};\n\n var fontSize = options.fontSize || this.internal.getFontSize();\n var font = options.font || this.internal.getFont();\n var charSpace = options.charSpace || this.internal.getCharSpace();\n var result = 0;\n\n if (API.processArabic) {\n text = API.processArabic(text);\n }\n\n if (typeof font.metadata.widthOfString === \"function\") {\n result =\n font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n } else {\n result = getCharWidthsArray\n .apply(this, arguments)\n .reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n }\n return result;\n });\n\n /**\n returns array of lines\n */\n var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n var answer = [];\n\n // 1st, chop off the piece that can fit on the hanging line.\n var i = 0,\n l = word.length,\n workingLen = 0;\n while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n workingLen += widths_array[i];\n i++;\n }\n // this is first line.\n answer.push(word.slice(0, i));\n\n // 2nd. Split the rest into maxLen pieces.\n var startOfLine = i;\n workingLen = 0;\n while (i !== l) {\n if (workingLen + widths_array[i] > maxLen) {\n answer.push(word.slice(startOfLine, i));\n workingLen = 0;\n startOfLine = i;\n }\n workingLen += widths_array[i];\n i++;\n }\n if (startOfLine !== i) {\n answer.push(word.slice(startOfLine, i));\n }\n\n return answer;\n };\n\n // Note, all sizing inputs for this function must be in \"font measurement units\"\n // By default, for PDF, it's \"point\".\n var splitParagraphIntoLines = function(text, maxlen, options) {\n // at this time works only on Western scripts, ones with space char\n // separating the words. Feel free to expand.\n\n if (!options) {\n options = {};\n }\n\n var line = [],\n lines = [line],\n line_length = options.textIndent || 0,\n separator_length = 0,\n current_word_length = 0,\n word,\n widths_array,\n words = text.split(\" \"),\n spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n i,\n l,\n tmp,\n lineIndent;\n\n if (options.lineIndent === -1) {\n lineIndent = words[0].length + 2;\n } else {\n lineIndent = options.lineIndent || 0;\n }\n if (lineIndent) {\n var pad = Array(lineIndent).join(\" \"),\n wrds = [];\n words.map(function(wrd) {\n wrd = wrd.split(/\\s*\\n/);\n if (wrd.length > 1) {\n wrds = wrds.concat(\n wrd.map(function(wrd, idx) {\n return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n })\n );\n } else {\n wrds.push(wrd[0]);\n }\n });\n words = wrds;\n lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n }\n\n for (i = 0, l = words.length; i < l; i++) {\n var force = 0;\n\n word = words[i];\n if (lineIndent && word[0] == \"\\n\") {\n word = word.substr(1);\n force = 1;\n }\n widths_array = getCharWidthsArray.apply(this, [word, options]);\n current_word_length = widths_array.reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n\n if (\n line_length + separator_length + current_word_length > maxlen ||\n force\n ) {\n if (current_word_length > maxlen) {\n // this happens when you have space-less long URLs for example.\n // we just chop these to size. We do NOT insert hiphens\n tmp = splitLongWord.apply(this, [\n word,\n widths_array,\n maxlen - (line_length + separator_length),\n maxlen\n ]);\n // first line we add to existing line object\n line.push(tmp.shift()); // it's ok to have extra space indicator there\n // last line we make into new line object\n line = [tmp.pop()];\n // lines in the middle we apped to lines object as whole lines\n while (tmp.length) {\n lines.push([tmp.shift()]); // single fragment occupies whole line\n }\n current_word_length = widths_array\n .slice(word.length - (line[0] ? line[0].length : 0))\n .reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n } else {\n // just put it on a new line\n line = [word];\n }\n\n // now we attach new line to lines\n lines.push(line);\n line_length = current_word_length + lineIndent;\n separator_length = spaceCharWidth;\n } else {\n line.push(word);\n\n line_length += separator_length + current_word_length;\n separator_length = spaceCharWidth;\n }\n }\n\n var postProcess;\n if (lineIndent) {\n postProcess = function(ln, idx) {\n return (idx ? pad : \"\") + ln.join(\" \");\n };\n } else {\n postProcess = function(ln) {\n return ln.join(\" \");\n };\n }\n\n return lines.map(postProcess);\n };\n\n /**\n * Splits a given string into an array of strings. Uses 'size' value\n * (in measurement units declared as default for the jsPDF instance)\n * and the font's \"widths\" and \"Kerning\" tables, where available, to\n * determine display length of a given string for a given font.\n *\n * We use character's 100% of unit size (height) as width when Width\n * table or other default width is not available.\n *\n * @name splitTextToSize\n * @public\n * @function\n * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n * @param {Object} options Optional flags needed for chopper to do the right thing.\n * @returns {Array} array Array with strings chopped to size.\n */\n API.splitTextToSize = function(text, maxlen, options) {\n \"use strict\";\n\n options = options || {};\n\n var fsize = options.fontSize || this.internal.getFontSize(),\n newOptions = function(options) {\n var widths = {\n 0: 1\n },\n kerning = {};\n\n if (!options.widths || !options.kerning) {\n var f = this.internal.getFont(options.fontName, options.fontStyle),\n encoding = \"Unicode\";\n // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n // Actual JavaScript-native String's 16bit char codes used.\n // no multi-byte logic here\n\n if (f.metadata[encoding]) {\n return {\n widths: f.metadata[encoding].widths || widths,\n kerning: f.metadata[encoding].kerning || kerning\n };\n } else {\n return {\n font: f.metadata,\n fontSize: this.internal.getFontSize(),\n charSpace: this.internal.getCharSpace()\n };\n }\n } else {\n return {\n widths: options.widths,\n kerning: options.kerning\n };\n }\n }.call(this, options);\n\n // first we split on end-of-line chars\n var paragraphs;\n if (Array.isArray(text)) {\n paragraphs = text;\n } else {\n paragraphs = String(text).split(/\\r?\\n/);\n }\n\n // now we convert size (max length of line) into \"font size units\"\n // at present time, the \"font size unit\" is always 'point'\n // 'proportional' means, \"in proportion to font size\"\n var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n // this may change in the future?\n // until then, proportional_maxlen is likely to be in 'points'\n\n // If first line is to be indented (shorter or longer) than maxLen\n // we indicate that by using CSS-style \"text-indent\" option.\n // here it's in font units too (which is likely 'points')\n // it can be negative (which makes the first line longer than maxLen)\n newOptions.textIndent = options.textIndent\n ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n : 0;\n newOptions.lineIndent = options.lineIndent;\n\n var i,\n l,\n output = [];\n for (i = 0, l = paragraphs.length; i < l; i++) {\n output = output.concat(\n splitParagraphIntoLines.apply(this, [\n paragraphs[i],\n fontUnit_maxLen,\n newOptions\n ])\n );\n }\n\n return output;\n };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n \"use strict\";\n API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n var decoded = \"0123456789abcdef\",\n encoded = \"klmnopqrstuvwxyz\",\n mappingUncompress = {},\n mappingCompress = {};\n\n for (var i = 0; i < encoded.length; i++) {\n mappingUncompress[encoded[i]] = decoded[i];\n mappingCompress[decoded[i]] = encoded[i];\n }\n\n var hex = function(value) {\n return \"0x\" + parseInt(value, 10).toString(16);\n };\n\n var compress = (API.__fontmetrics__.compress = function(data) {\n var vals = [\"{\"];\n var value, keystring, valuestring, numberprefix;\n\n for (var key in data) {\n value = data[key];\n\n if (!isNaN(parseInt(key, 10))) {\n key = parseInt(key, 10);\n keystring = hex(key).slice(2);\n keystring =\n keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n } else {\n keystring = \"'\" + key + \"'\";\n }\n\n if (typeof value == \"number\") {\n if (value < 0) {\n valuestring = hex(value).slice(3);\n numberprefix = \"-\";\n } else {\n valuestring = hex(value).slice(2);\n numberprefix = \"\";\n }\n valuestring =\n numberprefix +\n valuestring.slice(0, -1) +\n mappingCompress[valuestring.slice(-1)];\n } else {\n if (typeof value === \"object\") {\n valuestring = compress(value);\n } else {\n throw new Error(\n \"Don't know what to do with value type \" + typeof value + \".\"\n );\n }\n }\n vals.push(keystring + valuestring);\n }\n vals.push(\"}\");\n return vals.join(\"\");\n });\n\n /**\n * Uncompresses data compressed into custom, base16-like format.\n *\n * @public\n * @function\n * @param\n * @returns {Type}\n */\n var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n if (typeof data !== \"string\") {\n throw new Error(\"Invalid argument passed to uncompress.\");\n }\n\n var output = {},\n sign = 1,\n stringparts, // undef. will be [] in string mode\n activeobject = output,\n parentchain = [],\n parent_key_pair,\n keyparts = \"\",\n valueparts = \"\",\n key, // undef. will be Truthy when Key is resolved.\n datalen = data.length - 1, // stripping ending }\n ch;\n\n for (var i = 1; i < datalen; i += 1) {\n // - { } ' are special.\n\n ch = data[i];\n\n if (ch == \"'\") {\n if (stringparts) {\n // end of string mode\n key = stringparts.join(\"\");\n stringparts = undefined;\n } else {\n // start of string mode\n stringparts = [];\n }\n } else if (stringparts) {\n stringparts.push(ch);\n } else if (ch == \"{\") {\n // start of object\n parentchain.push([activeobject, key]);\n activeobject = {};\n key = undefined;\n } else if (ch == \"}\") {\n // end of object\n parent_key_pair = parentchain.pop();\n parent_key_pair[0][parent_key_pair[1]] = activeobject;\n key = undefined;\n activeobject = parent_key_pair[0];\n } else if (ch == \"-\") {\n sign = -1;\n } else {\n // must be number\n if (key === undefined) {\n if (mappingUncompress.hasOwnProperty(ch)) {\n keyparts += mappingUncompress[ch];\n key = parseInt(keyparts, 16) * sign;\n sign = +1;\n keyparts = \"\";\n } else {\n keyparts += ch;\n }\n } else {\n if (mappingUncompress.hasOwnProperty(ch)) {\n valueparts += mappingUncompress[ch];\n activeobject[key] = parseInt(valueparts, 16) * sign;\n sign = +1;\n key = undefined;\n valueparts = \"\";\n } else {\n valueparts += ch;\n }\n }\n }\n }\n return output;\n });\n\n // encoding = 'Unicode'\n // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n // Actual 16bit char codes used.\n // no multi-byte logic here\n\n // Unicode characters to WinAnsiEncoding:\n // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n // as well as give strings with some (supported by these fonts) Unicode characters and\n // these will be mapped to win cp1252\n // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n var encodingBlock = {\n codePages: [\"WinAnsiEncoding\"],\n WinAnsiEncoding: uncompress(\n \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n )\n };\n var encodings = {\n Unicode: {\n Courier: encodingBlock,\n \"Courier-Bold\": encodingBlock,\n \"Courier-BoldOblique\": encodingBlock,\n \"Courier-Oblique\": encodingBlock,\n Helvetica: encodingBlock,\n \"Helvetica-Bold\": encodingBlock,\n \"Helvetica-BoldOblique\": encodingBlock,\n \"Helvetica-Oblique\": encodingBlock,\n \"Times-Roman\": encodingBlock,\n \"Times-Bold\": encodingBlock,\n \"Times-BoldItalic\": encodingBlock,\n \"Times-Italic\": encodingBlock\n //\t, 'Symbol'\n //\t, 'ZapfDingbats'\n }\n };\n\n var fontMetrics = {\n Unicode: {\n // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n // width is 476/1000 or 47.6% of its height (regardless of font size)\n // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n \"Courier-Oblique\": uncompress(\n \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n ),\n \"Times-BoldItalic\": uncompress(\n \"{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}\"\n ),\n \"Helvetica-Bold\": uncompress(\n \"{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}\"\n ),\n Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-BoldOblique\": uncompress(\n \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n ),\n \"Times-Bold\": uncompress(\n \"{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}\"\n ),\n Symbol: uncompress(\n \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n ),\n Helvetica: uncompress(\n \"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}\"\n ),\n \"Helvetica-BoldOblique\": uncompress(\n \"{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}\"\n ),\n ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Times-Italic\": uncompress(\n \"{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}\"\n ),\n \"Times-Roman\": uncompress(\n \"{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}\"\n ),\n \"Helvetica-Oblique\": uncompress(\n \"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}\"\n )\n }\n };\n\n /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n API.events.push([\n \"addFont\",\n function(data) {\n var font = data.font;\n\n var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n if (metrics) {\n font.metadata[\"Unicode\"] = {};\n font.metadata[\"Unicode\"].widths = metrics.widths;\n font.metadata[\"Unicode\"].kerning = metrics.kerning;\n }\n\n var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n if (encodingBlock) {\n font.metadata[\"Unicode\"].encoding = encodingBlock;\n font.encoding = encodingBlock.codePages[0];\n }\n }\n ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n \"use strict\";\n\n var binaryStringToUint8Array = function(binary_string) {\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n };\n\n var addFont = function(font, file) {\n // eslint-disable-next-line no-control-regex\n if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n file = binaryStringToUint8Array(file);\n } else {\n file = binaryStringToUint8Array(atob(file));\n }\n font.metadata = jsPDF.API.TTFFont.open(file);\n font.metadata.Unicode = font.metadata.Unicode || {\n encoding: {},\n kerning: {},\n widths: []\n };\n font.metadata.glyIdsUsed = [0];\n };\n\n jsPDF.API.events.push([\n \"addFont\",\n function(data) {\n var file = undefined;\n var font = data.font;\n var instance = data.instance;\n if (font.isStandardFont) {\n return;\n }\n if (typeof instance !== \"undefined\") {\n if (instance.existsFileInVFS(font.postScriptName) === false) {\n file = instance.loadFile(font.postScriptName);\n } else {\n file = instance.getFileFromVFS(font.postScriptName);\n }\n if (typeof file !== \"string\") {\n throw new Error(\n \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n font.postScriptName +\n \"').\"\n );\n }\n addFont(font, file);\n } else {\n throw new Error(\n \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n font.postScriptName +\n \"').\"\n );\n }\n }\n ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n function loadCanvg() {\n return (function() {\n if (globalObject[\"canvg\"]) {\n return Promise.resolve(globalObject[\"canvg\"]);\n }\n\n return import(\"canvg\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load canvg: \" + e));\n })\n .then(function(canvg) {\n return canvg.default ? canvg.default : canvg;\n });\n }\n\n /**\n * Parses SVG XML and saves it as image into the PDF.\n *\n * Depends on canvas-element and canvg\n *\n * @name addSvgAsImage\n * @public\n * @function\n * @param {string} SVG-Data as Text\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n * @param {string} alias of SVG-Image (if used multiple times)\n * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n * @param {number} rotation of the image in degrees (0-359)\n *\n * @returns jsPDF jsPDF-instance\n */\n jsPDFAPI.addSvgAsImage = function(\n svg,\n x,\n y,\n w,\n h,\n alias,\n compression,\n rotation\n ) {\n if (isNaN(x) || isNaN(y)) {\n console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n }\n\n if (isNaN(w) || isNaN(h)) {\n console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n throw new Error(\n \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n );\n }\n\n var canvas = document.createElement(\"canvas\");\n canvas.width = w;\n canvas.height = h;\n var ctx = canvas.getContext(\"2d\");\n ctx.fillStyle = \"#fff\"; /// set white fill style\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n var options = {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true\n };\n var doc = this;\n return loadCanvg()\n .then(\n function(canvg) {\n return canvg.fromString(ctx, svg, options);\n },\n function() {\n return Promise.reject(new Error(\"Could not load canvg.\"));\n }\n )\n .then(function(instance) {\n return instance.render(options);\n })\n .then(function() {\n doc.addImage(\n canvas.toDataURL(\"image/jpeg\", 1.0),\n x,\n y,\n w,\n h,\n compression,\n rotation\n );\n });\n };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n /**\n * @name putTotalPages\n * @function\n * @param {string} pageExpression Regular Expression\n * @returns {jsPDF} jsPDF-instance\n */\n\n jsPDFAPI.putTotalPages = function(pageExpression) {\n \"use strict\";\n\n var replaceExpression;\n var totalNumberOfPages = 0;\n if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n replaceExpression = new RegExp(pageExpression, \"g\");\n totalNumberOfPages = this.internal.getNumberOfPages();\n } else {\n replaceExpression = new RegExp(\n this.pdfEscape16(pageExpression, this.internal.getFont()),\n \"g\"\n );\n totalNumberOfPages = this.pdfEscape16(\n this.internal.getNumberOfPages() + \"\",\n this.internal.getFont()\n );\n }\n\n for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n for (var i = 0; i < this.internal.pages[n].length; i++) {\n this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n replaceExpression,\n totalNumberOfPages\n );\n }\n }\n\n return this;\n };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n /**\n * Set the ViewerPreferences of the generated PDF\n *\n * @name viewerPreferences\n * @function\n * @public\n * @param {Object} options Array with the ViewerPreferences
    \n * Example: doc.viewerPreferences({\"FitWindow\":true});
    \n *
    \n * You can set following preferences:
    \n *
    \n * HideToolbar (boolean)
    \n * Default value: false
    \n *
    \n * HideMenubar (boolean)
    \n * Default value: false.
    \n *
    \n * HideWindowUI (boolean)
    \n * Default value: false.
    \n *
    \n * FitWindow (boolean)
    \n * Default value: false.
    \n *
    \n * CenterWindow (boolean)
    \n * Default value: false
    \n *
    \n * DisplayDocTitle (boolean)
    \n * Default value: false.
    \n *
    \n * NonFullScreenPageMode (string)
    \n * Possible values: UseNone, UseOutlines, UseThumbs, UseOC
    \n * Default value: UseNone
    \n *
    \n * Direction (string)
    \n * Possible values: L2R, R2L
    \n * Default value: L2R.
    \n *
    \n * ViewArea (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox.
    \n *
    \n * ViewClip (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox
    \n *
    \n * PrintArea (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox
    \n *
    \n * PrintClip (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox.
    \n *
    \n * PrintScaling (string)
    \n * Possible values: AppDefault, None
    \n * Default value: AppDefault.
    \n *
    \n * Duplex (string)
    \n * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n * Default value: none
    \n *
    \n * PickTrayByPDFSize (boolean)
    \n * Default value: false
    \n *
    \n * PrintPageRange (Array)
    \n * Example: [[1,5], [7,9]]
    \n * Default value: as defined by PDF viewer application
    \n *
    \n * NumCopies (Number)
    \n * Possible values: 1, 2, 3, 4, 5
    \n * Default value: 1
    \n *
    \n * For more information see the PDF Reference, sixth edition on Page 577\n * @param {boolean} doReset True to reset the settings\n * @function\n * @returns jsPDF jsPDF-instance\n * @example\n * var doc = new jsPDF()\n * doc.text('This is a test', 10, 10)\n * doc.viewerPreferences({'FitWindow': true}, true)\n * doc.save(\"viewerPreferences.pdf\")\n *\n * // Example printing 10 copies, using cropbox, and hiding UI.\n * doc.viewerPreferences({\n * 'HideWindowUI': true,\n * 'PrintArea': 'CropBox',\n * 'NumCopies': 10\n * })\n */\n jsPDFAPI.viewerPreferences = function(options, doReset) {\n options = options || {};\n doReset = doReset || false;\n\n var configuration;\n var configurationTemplate = {\n HideToolbar: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n HideMenubar: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n HideWindowUI: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n FitWindow: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n CenterWindow: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n DisplayDocTitle: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.4\n },\n NonFullScreenPageMode: {\n defaultValue: \"UseNone\",\n value: \"UseNone\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n pdfVersion: 1.3\n },\n Direction: {\n defaultValue: \"L2R\",\n value: \"L2R\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"L2R\", \"R2L\"],\n pdfVersion: 1.3\n },\n ViewArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n ViewClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintScaling: {\n defaultValue: \"AppDefault\",\n value: \"AppDefault\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"AppDefault\", \"None\"],\n pdfVersion: 1.6\n },\n Duplex: {\n defaultValue: \"\",\n value: \"none\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\n \"Simplex\",\n \"DuplexFlipShortEdge\",\n \"DuplexFlipLongEdge\",\n \"none\"\n ],\n pdfVersion: 1.7\n },\n PickTrayByPDFSize: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.7\n },\n PrintPageRange: {\n defaultValue: \"\",\n value: \"\",\n type: \"array\",\n explicitSet: false,\n valueSet: null,\n pdfVersion: 1.7\n },\n NumCopies: {\n defaultValue: 1,\n value: 1,\n type: \"integer\",\n explicitSet: false,\n valueSet: null,\n pdfVersion: 1.7\n }\n };\n\n var configurationKeys = Object.keys(configurationTemplate);\n\n var rangeArray = [];\n var i = 0;\n var j = 0;\n var k = 0;\n var isValid;\n\n var method;\n var value;\n\n function arrayContainsElement(array, element) {\n var iterator;\n var result = false;\n\n for (iterator = 0; iterator < array.length; iterator += 1) {\n if (array[iterator] === element) {\n result = true;\n }\n }\n return result;\n }\n\n if (this.internal.viewerpreferences === undefined) {\n this.internal.viewerpreferences = {};\n this.internal.viewerpreferences.configuration = JSON.parse(\n JSON.stringify(configurationTemplate)\n );\n this.internal.viewerpreferences.isSubscribed = false;\n }\n configuration = this.internal.viewerpreferences.configuration;\n\n if (options === \"reset\" || doReset === true) {\n var len = configurationKeys.length;\n\n for (k = 0; k < len; k += 1) {\n configuration[configurationKeys[k]].value =\n configuration[configurationKeys[k]].defaultValue;\n configuration[configurationKeys[k]].explicitSet = false;\n }\n }\n\n if (typeof options === \"object\") {\n for (method in options) {\n value = options[method];\n if (\n arrayContainsElement(configurationKeys, method) &&\n value !== undefined\n ) {\n if (\n configuration[method].type === \"boolean\" &&\n typeof value === \"boolean\"\n ) {\n configuration[method].value = value;\n } else if (\n configuration[method].type === \"name\" &&\n arrayContainsElement(configuration[method].valueSet, value)\n ) {\n configuration[method].value = value;\n } else if (\n configuration[method].type === \"integer\" &&\n Number.isInteger(value)\n ) {\n configuration[method].value = value;\n } else if (configuration[method].type === \"array\") {\n for (i = 0; i < value.length; i += 1) {\n isValid = true;\n if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n rangeArray.push(String(value[i] - 1));\n } else if (value[i].length > 1) {\n for (j = 0; j < value[i].length; j += 1) {\n if (typeof value[i][j] !== \"number\") {\n isValid = false;\n }\n }\n if (isValid === true) {\n rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n }\n }\n }\n configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n } else {\n configuration[method].value = configuration[method].defaultValue;\n }\n\n configuration[method].explicitSet = true;\n }\n }\n }\n\n if (this.internal.viewerpreferences.isSubscribed === false) {\n this.internal.events.subscribe(\"putCatalog\", function() {\n var pdfDict = [];\n var vPref;\n for (vPref in configuration) {\n if (configuration[vPref].explicitSet === true) {\n if (configuration[vPref].type === \"name\") {\n pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n } else {\n pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n }\n }\n }\n if (pdfDict.length !== 0) {\n this.internal.write(\n \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n );\n }\n });\n this.internal.viewerpreferences.isSubscribed = true;\n }\n\n this.internal.viewerpreferences.configuration = configuration;\n return this;\n };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var postPutResources = function() {\n var xmpmeta_beginning = '';\n var rdf_beginning =\n '';\n var rdf_ending = \"\";\n var xmpmeta_ending = \"\";\n var utf8_xmpmeta_beginning = unescape(\n encodeURIComponent(xmpmeta_beginning)\n );\n var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n var utf8_metadata = unescape(\n encodeURIComponent(this.internal.__metadata__.metadata)\n );\n var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n var total_len =\n utf8_rdf_beginning.length +\n utf8_metadata.length +\n utf8_rdf_ending.length +\n utf8_xmpmeta_beginning.length +\n utf8_xmpmeta_ending.length;\n\n this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n this.internal.write(\n \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n );\n this.internal.write(\"stream\");\n this.internal.write(\n utf8_xmpmeta_beginning +\n utf8_rdf_beginning +\n utf8_metadata +\n utf8_rdf_ending +\n utf8_xmpmeta_ending\n );\n this.internal.write(\"endstream\");\n this.internal.write(\"endobj\");\n };\n\n var putCatalog = function() {\n if (this.internal.__metadata__.metadata_object_number) {\n this.internal.write(\n \"/Metadata \" +\n this.internal.__metadata__.metadata_object_number +\n \" 0 R\"\n );\n }\n };\n\n /**\n * Adds XMP formatted metadata to PDF\n *\n * @name addMetadata\n * @function\n * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n * @returns {jsPDF} jsPDF-instance\n */\n jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n if (typeof this.internal.__metadata__ === \"undefined\") {\n this.internal.__metadata__ = {\n metadata: metadata,\n namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n };\n this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n this.internal.events.subscribe(\"postPutResources\", postPutResources);\n }\n return this;\n };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n \"use strict\";\n var jsPDFAPI = jsPDF.API;\n\n /***************************************************************************************************/\n /* function : pdfEscape16 */\n /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n /* the corresponding glyph id and width, and then adding padding to the string. */\n /***************************************************************************************************/\n var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n var widths = font.metadata.Unicode.widths;\n var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n var ar = [\"\"];\n for (var i = 0, l = text.length, t; i < l; ++i) {\n t = font.metadata.characterToGlyph(text.charCodeAt(i));\n font.metadata.glyIdsUsed.push(t);\n font.metadata.toUnicode[t] = text.charCodeAt(i);\n if (widths.indexOf(t) == -1) {\n widths.push(t);\n widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n }\n if (t == \"0\") {\n //Spaces are not allowed in cmap.\n return ar.join(\"\");\n } else {\n t = t.toString(16);\n ar.push(padz[4 - t.length], t);\n }\n }\n return ar.join(\"\");\n });\n\n var toUnicodeCmap = function(map) {\n var code, codes, range, unicode, unicodeMap, _i, _len;\n unicodeMap =\n \"/CIDInit /ProcSet findresource begin\\n12 dict begin\\nbegincmap\\n/CIDSystemInfo <<\\n /Registry (Adobe)\\n /Ordering (UCS)\\n /Supplement 0\\n>> def\\n/CMapName /Adobe-Identity-UCS def\\n/CMapType 2 def\\n1 begincodespacerange\\n<0000>\\nendcodespacerange\";\n codes = Object.keys(map).sort(function(a, b) {\n return a - b;\n });\n\n range = [];\n for (_i = 0, _len = codes.length; _i < _len; _i++) {\n code = codes[_i];\n if (range.length >= 100) {\n unicodeMap +=\n \"\\n\" +\n range.length +\n \" beginbfchar\\n\" +\n range.join(\"\\n\") +\n \"\\nendbfchar\";\n range = [];\n }\n\n if (\n map[code] !== undefined &&\n map[code] !== null &&\n typeof map[code].toString === \"function\"\n ) {\n unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n code = (\"0000\" + (+code).toString(16)).slice(-4);\n range.push(\"<\" + code + \"><\" + unicode + \">\");\n }\n }\n\n if (range.length) {\n unicodeMap +=\n \"\\n\" +\n range.length +\n \" beginbfchar\\n\" +\n range.join(\"\\n\") +\n \"\\nendbfchar\\n\";\n }\n unicodeMap +=\n \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n return unicodeMap;\n };\n\n var identityHFunction = function(options) {\n var font = options.font;\n var out = options.out;\n var newObject = options.newObject;\n var putStream = options.putStream;\n\n if (\n font.metadata instanceof jsPDF.API.TTFFont &&\n font.encoding === \"Identity-H\"\n ) {\n //Tag with Identity-H\n var widths = font.metadata.Unicode.widths;\n var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n var pdfOutput = data;\n var pdfOutput2 = \"\";\n for (var i = 0; i < pdfOutput.length; i++) {\n pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n }\n var fontTable = newObject();\n putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n out(\"endobj\");\n\n var cmap = newObject();\n var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n putStream({ data: cmapData, addLength1: true, objectId: cmap });\n out(\"endobj\");\n\n var fontDescriptor = newObject();\n out(\"<<\");\n out(\"/Type /FontDescriptor\");\n out(\"/FontName /\" + toPDFName(font.fontName));\n out(\"/FontFile2 \" + fontTable + \" 0 R\");\n out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n out(\"/Flags \" + font.metadata.flags);\n out(\"/StemV \" + font.metadata.stemV);\n out(\"/ItalicAngle \" + font.metadata.italicAngle);\n out(\"/Ascent \" + font.metadata.ascender);\n out(\"/Descent \" + font.metadata.decender);\n out(\"/CapHeight \" + font.metadata.capHeight);\n out(\">>\");\n out(\"endobj\");\n\n var DescendantFont = newObject();\n out(\"<<\");\n out(\"/Type /Font\");\n out(\"/BaseFont /\" + toPDFName(font.fontName));\n out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n out(\"/CIDToGIDMap /Identity\");\n out(\"/DW 1000\");\n out(\"/Subtype /CIDFontType2\");\n out(\"/CIDSystemInfo\");\n out(\"<<\");\n out(\"/Supplement 0\");\n out(\"/Registry (Adobe)\");\n out(\"/Ordering (\" + font.encoding + \")\");\n out(\">>\");\n out(\">>\");\n out(\"endobj\");\n\n font.objectNumber = newObject();\n out(\"<<\");\n out(\"/Type /Font\");\n out(\"/Subtype /Type0\");\n out(\"/ToUnicode \" + cmap + \" 0 R\");\n out(\"/BaseFont /\" + toPDFName(font.fontName));\n out(\"/Encoding /\" + font.encoding);\n out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n out(\">>\");\n out(\"endobj\");\n\n font.isAlreadyPutted = true;\n }\n };\n\n jsPDFAPI.events.push([\n \"putFont\",\n function(args) {\n identityHFunction(args);\n }\n ]);\n\n var winAnsiEncodingFunction = function(options) {\n var font = options.font;\n var out = options.out;\n var newObject = options.newObject;\n var putStream = options.putStream;\n\n if (\n font.metadata instanceof jsPDF.API.TTFFont &&\n font.encoding === \"WinAnsiEncoding\"\n ) {\n //Tag with WinAnsi encoding\n var data = font.metadata.rawData;\n var pdfOutput = data;\n var pdfOutput2 = \"\";\n for (var i = 0; i < pdfOutput.length; i++) {\n pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n }\n var fontTable = newObject();\n putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n out(\"endobj\");\n\n var cmap = newObject();\n var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n putStream({ data: cmapData, addLength1: true, objectId: cmap });\n out(\"endobj\");\n\n var fontDescriptor = newObject();\n out(\"<<\");\n out(\"/Descent \" + font.metadata.decender);\n out(\"/CapHeight \" + font.metadata.capHeight);\n out(\"/StemV \" + font.metadata.stemV);\n out(\"/Type /FontDescriptor\");\n out(\"/FontFile2 \" + fontTable + \" 0 R\");\n out(\"/Flags 96\");\n out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n out(\"/FontName /\" + toPDFName(font.fontName));\n out(\"/ItalicAngle \" + font.metadata.italicAngle);\n out(\"/Ascent \" + font.metadata.ascender);\n out(\">>\");\n out(\"endobj\");\n font.objectNumber = newObject();\n for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n font.metadata.hmtx.widths[j] = parseInt(\n font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n ); //Change the width of Em units to Point units.\n }\n out(\n \"<>\"\n );\n out(\"endobj\");\n font.isAlreadyPutted = true;\n }\n };\n\n jsPDFAPI.events.push([\n \"putFont\",\n function(args) {\n winAnsiEncodingFunction(args);\n }\n ]);\n\n var utf8TextFunction = function(args) {\n var text = args.text || \"\";\n var x = args.x;\n var y = args.y;\n var options = args.options || {};\n var mutex = args.mutex || {};\n\n var pdfEscape = mutex.pdfEscape;\n var activeFontKey = mutex.activeFontKey;\n var fonts = mutex.fonts;\n var key = activeFontKey;\n\n var str = \"\",\n s = 0,\n cmapConfirm;\n var strText = \"\";\n var encoding = fonts[key].encoding;\n\n if (fonts[key].encoding !== \"Identity-H\") {\n return {\n text: text,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n }\n strText = text;\n\n key = activeFontKey;\n if (Array.isArray(text)) {\n strText = text[0];\n }\n for (s = 0; s < strText.length; s += 1) {\n if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n cmapConfirm =\n fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n /*\n if (Object.prototype.toString.call(text) === '[object Array]') {\n var i = 0;\n // for (i = 0; i < text.length; i += 1) {\n if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n } else {\n\n }\n //}\n\n } else {\n cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n }*/\n }\n if (!cmapConfirm) {\n if (\n strText[s].charCodeAt(0) < 256 &&\n fonts[key].metadata.hasOwnProperty(\"Unicode\")\n ) {\n str += strText[s];\n } else {\n str += \"\";\n }\n } else {\n str += strText[s];\n }\n }\n var result = \"\";\n if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n //For the default 13 font\n result = pdfEscape(str, key)\n .split(\"\")\n .map(function(cv) {\n return cv.charCodeAt(0).toString(16);\n })\n .join(\"\");\n } else if (encoding === \"Identity-H\") {\n result = pdfEscape16(str, fonts[key]);\n }\n mutex.isHex = true;\n\n return {\n text: result,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n };\n\n var utf8EscapeFunction = function(parms) {\n var text = parms.text || \"\",\n x = parms.x,\n y = parms.y,\n options = parms.options,\n mutex = parms.mutex;\n var tmpText = [];\n var args = {\n text: text,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n\n if (Array.isArray(text)) {\n var i = 0;\n for (i = 0; i < text.length; i += 1) {\n if (Array.isArray(text[i])) {\n if (text[i].length === 3) {\n tmpText.push([\n utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n .text,\n text[i][1],\n text[i][2]\n ]);\n } else {\n tmpText.push(\n utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n );\n }\n } else {\n tmpText.push(\n utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n );\n }\n }\n parms.text = tmpText;\n } else {\n parms.text = utf8TextFunction(\n Object.assign({}, args, { text: text })\n ).text;\n }\n };\n\n jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var _initializeVFS = function() {\n if (typeof this.internal.vFS === \"undefined\") {\n this.internal.vFS = {};\n }\n return true;\n };\n\n /**\n * Check if the file exists in the vFS\n *\n * @name existsFileInVFS\n * @function\n * @param {string} Possible filename in the vFS.\n * @returns {boolean}\n * @example\n * doc.existsFileInVFS(\"someFile.txt\");\n */\n jsPDFAPI.existsFileInVFS = function(filename) {\n _initializeVFS.call(this);\n return typeof this.internal.vFS[filename] !== \"undefined\";\n };\n\n /**\n * Add a file to the vFS\n *\n * @name addFileToVFS\n * @function\n * @param {string} filename The name of the file which should be added.\n * @param {string} filecontent The content of the file.\n * @returns {jsPDF}\n * @example\n * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n */\n jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n _initializeVFS.call(this);\n this.internal.vFS[filename] = filecontent;\n return this;\n };\n\n /**\n * Get the file from the vFS\n *\n * @name getFileFromVFS\n * @function\n * @param {string} The name of the file which gets requested.\n * @returns {string}\n * @example\n * doc.getFileFromVFS(\"someFile.txt\");\n */\n jsPDFAPI.getFileFromVFS = function(filename) {\n _initializeVFS.call(this);\n\n if (typeof this.internal.vFS[filename] !== \"undefined\") {\n return this.internal.vFS[filename];\n }\n return null;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n \"use strict\";\n /**\n * Table of Unicode types.\n *\n * Generated by:\n *\n * var bidi = require(\"./bidi/index\");\n * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n *\n * for( var i = 0; i < bidi_accumulate.length; i++) {\n * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n * }\n * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n *\n * Based on:\n * https://github.com/mathiasbynens/unicode-8.0.0\n */\n var bidiUnicodeTypes = [\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"S\",\n \"B\",\n \"S\",\n \"WS\",\n \"B\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"B\",\n \"B\",\n \"B\",\n \"S\",\n \"WS\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ES\",\n \"CS\",\n \"ES\",\n \"CS\",\n \"CS\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"B\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"CS\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"BN\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"EN\",\n \"EN\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"EN\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"N\",\n \"N\",\n \"AL\",\n \"ET\",\n \"ET\",\n \"AL\",\n \"CS\",\n \"AL\",\n \"N\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"ET\",\n \"AN\",\n \"AN\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AN\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"L\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"WS\",\n \"B\",\n \"LRE\",\n \"RLE\",\n \"PDF\",\n \"LRO\",\n \"RLO\",\n \"CS\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"WS\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"N\",\n \"LRI\",\n \"RLI\",\n \"FSI\",\n \"PDI\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"EN\",\n \"L\",\n \"N\",\n \"N\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"NSM\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"ES\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"CS\",\n \"N\",\n \"CS\",\n \"N\",\n \"N\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"N\",\n \"N\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"N\",\n \"BN\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ES\",\n \"CS\",\n \"ES\",\n \"CS\",\n \"CS\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\"\n ];\n\n /**\n * Unicode Bidi algorithm compliant Bidi engine.\n * For reference see http://unicode.org/reports/tr9/\n */\n\n /**\n * constructor ( options )\n *\n * Initializes Bidi engine\n *\n * @param {Object} See 'setOptions' below for detailed description.\n * options are cashed between invocation of 'doBidiReorder' method\n *\n * sample usage pattern of BidiEngine:\n * var opt = {\n * \tisInputVisual: true,\n * \tisInputRtl: false,\n * \tisOutputVisual: false,\n * \tisOutputRtl: false,\n * \tisSymmetricSwapping: true\n * }\n * var sourceToTarget = [], levels = [];\n * var bidiEng = Globalize.bidiEngine(opt);\n * var src = \"text string to be reordered\";\n * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n */\n\n jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n var _STATE_TABLE_LTR = [\n [0, 3, 0, 1, 0, 0, 0],\n [0, 3, 0, 1, 2, 2, 0],\n [0, 3, 0, 0x11, 2, 0, 1],\n [0, 3, 5, 5, 4, 1, 0],\n [0, 3, 0x15, 0x15, 4, 0, 1],\n [0, 3, 5, 5, 4, 2, 0]\n ];\n\n var _STATE_TABLE_RTL = [\n [2, 0, 1, 1, 0, 1, 0],\n [2, 0, 1, 1, 0, 2, 0],\n [2, 0, 2, 1, 3, 2, 0],\n [2, 0, 2, 0x21, 3, 1, 1]\n ];\n\n var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n var _UNICODE_RANGES_MAP = {\n 0: 0,\n 5: 1,\n 6: 2,\n 7: 3,\n 0x20: 4,\n 0xfb: 5,\n 0xfe: 6,\n 0xff: 7\n };\n\n var _SWAP_TABLE = [\n \"\\u0028\",\n \"\\u0029\",\n \"\\u0028\",\n \"\\u003C\",\n \"\\u003E\",\n \"\\u003C\",\n \"\\u005B\",\n \"\\u005D\",\n \"\\u005B\",\n \"\\u007B\",\n \"\\u007D\",\n \"\\u007B\",\n \"\\u00AB\",\n \"\\u00BB\",\n \"\\u00AB\",\n \"\\u2039\",\n \"\\u203A\",\n \"\\u2039\",\n \"\\u2045\",\n \"\\u2046\",\n \"\\u2045\",\n \"\\u207D\",\n \"\\u207E\",\n \"\\u207D\",\n \"\\u208D\",\n \"\\u208E\",\n \"\\u208D\",\n \"\\u2264\",\n \"\\u2265\",\n \"\\u2264\",\n \"\\u2329\",\n \"\\u232A\",\n \"\\u2329\",\n \"\\uFE59\",\n \"\\uFE5A\",\n \"\\uFE59\",\n \"\\uFE5B\",\n \"\\uFE5C\",\n \"\\uFE5B\",\n \"\\uFE5D\",\n \"\\uFE5E\",\n \"\\uFE5D\",\n \"\\uFE64\",\n \"\\uFE65\",\n \"\\uFE64\"\n ];\n\n var _LTR_RANGES_REG_EXPR = new RegExp(\n /^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/\n );\n\n var _lastArabic = false,\n _hasUbatAl,\n _hasUbatB,\n _hasUbatS,\n DIR_LTR = 0,\n DIR_RTL = 1,\n _isInVisual,\n _isInRtl,\n _isOutVisual,\n _isOutRtl,\n _isSymmetricSwapping,\n _dir = DIR_LTR;\n\n this.__bidiEngine__ = {};\n\n var _init = function(text, sourceToTargetMap) {\n if (sourceToTargetMap) {\n for (var i = 0; i < text.length; i++) {\n sourceToTargetMap[i] = i;\n }\n }\n if (_isInRtl === undefined) {\n _isInRtl = _isContextualDirRtl(text);\n }\n if (_isOutRtl === undefined) {\n _isOutRtl = _isContextualDirRtl(text);\n }\n };\n\n // for reference see 3.2 in http://unicode.org/reports/tr9/\n //\n var _getCharType = function(ch) {\n var charCode = ch.charCodeAt(),\n range = charCode >> 8,\n rangeIdx = _UNICODE_RANGES_MAP[range];\n\n if (rangeIdx !== undefined) {\n return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n } else if (range === 0xfc || range === 0xfd) {\n return \"AL\";\n } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n //unlikely case\n return \"L\";\n } else if (range === 8) {\n // even less likely\n return \"R\";\n }\n return \"N\"; //undefined type, mark as neutral\n };\n\n var _isContextualDirRtl = function(text) {\n for (var i = 0, charType; i < text.length; i++) {\n charType = _getCharType(text.charAt(i));\n if (charType === \"L\") {\n return false;\n } else if (charType === \"R\") {\n return true;\n }\n }\n return false;\n };\n\n // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n //\n var _resolveCharType = function(chars, types, resolvedTypes, index) {\n var cType = types[index],\n wType,\n nType,\n i,\n len;\n switch (cType) {\n case \"L\":\n case \"R\":\n _lastArabic = false;\n break;\n case \"N\":\n case \"AN\":\n break;\n\n case \"EN\":\n if (_lastArabic) {\n cType = \"AN\";\n }\n break;\n\n case \"AL\":\n _lastArabic = true;\n _hasUbatAl = true;\n cType = \"R\";\n break;\n\n case \"WS\":\n cType = \"N\";\n break;\n\n case \"CS\":\n if (\n index < 1 ||\n index + 1 >= types.length ||\n ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n ) {\n cType = \"N\";\n } else if (_lastArabic) {\n nType = \"AN\";\n }\n cType = nType === wType ? nType : \"N\";\n break;\n\n case \"ES\":\n wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n cType =\n wType === \"EN\" &&\n index + 1 < types.length &&\n types[index + 1] === \"EN\"\n ? \"EN\"\n : \"N\";\n break;\n\n case \"ET\":\n if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n cType = \"EN\";\n break;\n } else if (_lastArabic) {\n cType = \"N\";\n break;\n }\n i = index + 1;\n len = types.length;\n while (i < len && types[i] === \"ET\") {\n i++;\n }\n if (i < len && types[i] === \"EN\") {\n cType = \"EN\";\n } else {\n cType = \"N\";\n }\n break;\n\n case \"NSM\":\n if (_isInVisual && !_isInRtl) {\n //V->L\n len = types.length;\n i = index + 1;\n while (i < len && types[i] === \"NSM\") {\n i++;\n }\n if (i < len) {\n var c = chars[index];\n var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n wType = types[i];\n if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n cType = \"R\";\n break;\n }\n }\n }\n if (index < 1 || (wType = types[index - 1]) === \"B\") {\n cType = \"N\";\n } else {\n cType = resolvedTypes[index - 1];\n }\n break;\n\n case \"B\":\n _lastArabic = false;\n _hasUbatB = true;\n cType = _dir;\n break;\n\n case \"S\":\n _hasUbatS = true;\n cType = \"N\";\n break;\n\n case \"LRE\":\n case \"RLE\":\n case \"LRO\":\n case \"RLO\":\n case \"PDF\":\n _lastArabic = false;\n break;\n case \"BN\":\n cType = \"N\";\n break;\n }\n return cType;\n };\n\n var _handleUbatS = function(types, levels, length) {\n for (var i = 0; i < length; i++) {\n if (types[i] === \"S\") {\n levels[i] = _dir;\n for (var j = i - 1; j >= 0; j--) {\n if (types[j] === \"WS\") {\n levels[j] = _dir;\n } else {\n break;\n }\n }\n }\n }\n };\n\n var _invertString = function(text, sourceToTargetMap, levels) {\n var charArray = text.split(\"\");\n if (levels) {\n _computeLevels(charArray, levels, { hiLevel: _dir });\n }\n charArray.reverse();\n sourceToTargetMap && sourceToTargetMap.reverse();\n return charArray.join(\"\");\n };\n\n // For reference see 3.3 in http://unicode.org/reports/tr9/\n //\n var _computeLevels = function(chars, levels, params) {\n var action,\n condition,\n i,\n index,\n newLevel,\n prevState,\n condPos = -1,\n len = chars.length,\n newState = 0,\n resolvedTypes = [],\n stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n types = [];\n\n _lastArabic = false;\n _hasUbatAl = false;\n _hasUbatB = false;\n _hasUbatS = false;\n for (i = 0; i < len; i++) {\n types[i] = _getCharType(chars[i]);\n }\n for (index = 0; index < len; index++) {\n prevState = newState;\n resolvedTypes[index] = _resolveCharType(\n chars,\n types,\n resolvedTypes,\n index\n );\n newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n action = newState & 0xf0;\n newState &= 0x0f;\n levels[index] = newLevel = stateTable[newState][5];\n if (action > 0) {\n if (action === 0x10) {\n for (i = condPos; i < index; i++) {\n levels[i] = 1;\n }\n condPos = -1;\n } else {\n condPos = -1;\n }\n }\n condition = stateTable[newState][6];\n if (condition) {\n if (condPos === -1) {\n condPos = index;\n }\n } else {\n if (condPos > -1) {\n for (i = condPos; i < index; i++) {\n levels[i] = newLevel;\n }\n condPos = -1;\n }\n }\n if (types[index] === \"B\") {\n levels[index] = 0;\n }\n params.hiLevel |= newLevel;\n }\n if (_hasUbatS) {\n _handleUbatS(types, levels, len);\n }\n };\n\n // for reference see 3.4 in http://unicode.org/reports/tr9/\n //\n var _invertByLevel = function(\n level,\n charArray,\n sourceToTargetMap,\n levels,\n params\n ) {\n if (params.hiLevel < level) {\n return;\n }\n if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n charArray.reverse();\n sourceToTargetMap && sourceToTargetMap.reverse();\n return;\n }\n var ch,\n high,\n end,\n low,\n len = charArray.length,\n start = 0;\n\n while (start < len) {\n if (levels[start] >= level) {\n end = start + 1;\n while (end < len && levels[end] >= level) {\n end++;\n }\n for (low = start, high = end - 1; low < high; low++, high--) {\n ch = charArray[low];\n charArray[low] = charArray[high];\n charArray[high] = ch;\n if (sourceToTargetMap) {\n ch = sourceToTargetMap[low];\n sourceToTargetMap[low] = sourceToTargetMap[high];\n sourceToTargetMap[high] = ch;\n }\n }\n start = end;\n }\n start++;\n }\n };\n\n // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n //\n var _symmetricSwap = function(charArray, levels, params) {\n if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n for (var i = 0, index; i < charArray.length; i++) {\n if (levels[i] === 1) {\n index = _SWAP_TABLE.indexOf(charArray[i]);\n if (index >= 0) {\n charArray[i] = _SWAP_TABLE[index + 1];\n }\n }\n }\n }\n };\n\n var _reorder = function(text, sourceToTargetMap, levels) {\n var charArray = text.split(\"\"),\n params = { hiLevel: _dir };\n\n if (!levels) {\n levels = [];\n }\n _computeLevels(charArray, levels, params);\n _symmetricSwap(charArray, levels, params);\n _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n return charArray.join(\"\");\n };\n\n // doBidiReorder( text, sourceToTargetMap, levels )\n // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n // Returns reordered string\n // @text [String]:\n // - input string to be reordered, this is input parameter\n // $sourceToTargetMap [Array] (optional)\n // - resultant mapping between input and output strings, this is output parameter\n // $levels [Array] (optional)\n // - array of calculated Bidi levels, , this is output parameter\n this.__bidiEngine__.doBidiReorder = function(\n text,\n sourceToTargetMap,\n levels\n ) {\n _init(text, sourceToTargetMap);\n if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n // LLTR->VLTR, LRTL->VLTR\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n // VRTL->VLTR, VLTR->VRTL\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _invertString(text, sourceToTargetMap, levels);\n } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n // LLTR->VRTL, LRTL->VRTL\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n // VLTR->LLTR\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n // VLTR->LRTL, VRTL->LLTR\n text = _invertString(text, sourceToTargetMap);\n if (_isInRtl) {\n //LLTR -> VLTR\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else {\n //LRTL -> VRTL\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n }\n } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n // VRTL->LRTL\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n // LRTL->LLTR, LLTR->LRTL\n var isSymmetricSwappingOrig = _isSymmetricSwapping;\n if (_isInRtl) {\n //LRTL->LLTR\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n _dir = DIR_LTR;\n _isSymmetricSwapping = false;\n text = _reorder(text, sourceToTargetMap, levels);\n _isSymmetricSwapping = isSymmetricSwappingOrig;\n } else {\n //LLTR->LRTL\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n _dir = DIR_RTL;\n _isSymmetricSwapping = false;\n text = _reorder(text, sourceToTargetMap, levels);\n _isSymmetricSwapping = isSymmetricSwappingOrig;\n text = _invertString(text, sourceToTargetMap);\n }\n }\n return text;\n };\n\n /**\n * @name setOptions( options )\n * @function\n * Sets options for Bidi conversion\n * @param {Object}:\n * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n */\n this.__bidiEngine__.setOptions = function(options) {\n if (options) {\n _isInVisual = options.isInputVisual;\n _isOutVisual = options.isOutputVisual;\n _isInRtl = options.isInputRtl;\n _isOutRtl = options.isOutputRtl;\n _isSymmetricSwapping = options.isSymmetricSwapping;\n }\n };\n\n this.__bidiEngine__.setOptions(options);\n return this.__bidiEngine__;\n };\n\n var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n var bidiEngineFunction = function(args) {\n var text = args.text;\n var x = args.x;\n var y = args.y;\n var options = args.options || {};\n var mutex = args.mutex || {};\n var lang = options.lang;\n var tmpText = [];\n\n options.isInputVisual =\n typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n bidiEngine.setOptions(options);\n\n if (Object.prototype.toString.call(text) === \"[object Array]\") {\n var i = 0;\n tmpText = [];\n for (i = 0; i < text.length; i += 1) {\n if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n tmpText.push([\n bidiEngine.doBidiReorder(text[i][0]),\n text[i][1],\n text[i][2]\n ]);\n } else {\n tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n }\n }\n args.text = tmpText;\n } else {\n args.text = bidiEngine.doBidiReorder(text);\n }\n bidiEngine.setOptions({ isInputVisual: true });\n };\n\n jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font *\n * Start Data : 2017. 01. 22. *\n * Comment : TEXT API *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n /************************************************************************/\n /* function : open */\n /* comment : Decode the encoded ttf content and create a TTFFont object. */\n /************************************************************************/\n TTFFont.open = function(file) {\n return new TTFFont(file);\n };\n /***************************************************************/\n /* function : TTFFont gernerator */\n /* comment : Decode TTF contents are parsed, Data, */\n /* Subset object is created, and registerTTF function is called.*/\n /***************************************************************/\n function TTFFont(rawData) {\n var data;\n this.rawData = rawData;\n data = this.contents = new Data(rawData);\n this.contents.pos = 4;\n if (data.readString(4) === \"ttcf\") {\n throw new Error(\"TTCF not supported.\");\n } else {\n data.pos = 0;\n this.parse();\n this.subset = new Subset(this);\n this.registerTTF();\n }\n }\n /********************************************************/\n /* function : parse */\n /* comment : TTF Parses the file contents by each table.*/\n /********************************************************/\n TTFFont.prototype.parse = function() {\n this.directory = new Directory(this.contents);\n this.head = new HeadTable(this);\n this.name = new NameTable(this);\n this.cmap = new CmapTable(this);\n this.toUnicode = {};\n this.hhea = new HheaTable(this);\n this.maxp = new MaxpTable(this);\n this.hmtx = new HmtxTable(this);\n this.post = new PostTable(this);\n this.os2 = new OS2Table(this);\n this.loca = new LocaTable(this);\n this.glyf = new GlyfTable(this);\n this.ascender =\n (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n this.decender =\n (this.os2.exists && this.os2.decender) || this.hhea.decender;\n this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n return (this.bbox = [\n this.head.xMin,\n this.head.yMin,\n this.head.xMax,\n this.head.yMax\n ]);\n };\n /***************************************************************/\n /* function : registerTTF */\n /* comment : Get the value to assign pdf font descriptors. */\n /***************************************************************/\n TTFFont.prototype.registerTTF = function() {\n var e, hi, low, raw, _ref;\n this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n this.bbox = function() {\n var _i, _len, _ref, _results;\n _ref = this.bbox;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n e = _ref[_i];\n _results.push(Math.round(e * this.scaleFactor));\n }\n return _results;\n }.call(this);\n this.stemV = 0;\n if (this.post.exists) {\n raw = this.post.italic_angle;\n hi = raw >> 16;\n low = raw & 0xff;\n if ((hi & 0x8000) !== 0) {\n hi = -((hi ^ 0xffff) + 1);\n }\n this.italicAngle = +(\"\" + hi + \".\" + low);\n } else {\n this.italicAngle = 0;\n }\n this.ascender = Math.round(this.ascender * this.scaleFactor);\n this.decender = Math.round(this.decender * this.scaleFactor);\n this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n this.isSerif =\n (_ref = this.familyClass) === 1 ||\n _ref === 2 ||\n _ref === 3 ||\n _ref === 4 ||\n _ref === 5 ||\n _ref === 7;\n this.isScript = this.familyClass === 10;\n this.flags = 0;\n if (this.post.isFixedPitch) {\n this.flags |= 1 << 0;\n }\n if (this.isSerif) {\n this.flags |= 1 << 1;\n }\n if (this.isScript) {\n this.flags |= 1 << 3;\n }\n if (this.italicAngle !== 0) {\n this.flags |= 1 << 6;\n }\n this.flags |= 1 << 5;\n if (!this.cmap.unicode) {\n throw new Error(\"No unicode cmap for font\");\n }\n };\n TTFFont.prototype.characterToGlyph = function(character) {\n var _ref;\n return (\n ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n 0\n );\n };\n TTFFont.prototype.widthOfGlyph = function(glyph) {\n var scale;\n scale = 1000.0 / this.head.unitsPerEm;\n return this.hmtx.forGlyph(glyph).advance * scale;\n };\n TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n var charCode, i, scale, width, _ref;\n string = \"\" + string;\n width = 0;\n for (\n i = 0, _ref = string.length;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n charCode = string.charCodeAt(i);\n width +=\n this.widthOfGlyph(this.characterToGlyph(charCode)) +\n charSpace * (1000 / size) || 0;\n }\n scale = size / 1000;\n return width * scale;\n };\n TTFFont.prototype.lineHeight = function(size, includeGap) {\n var gap;\n if (includeGap == null) {\n includeGap = false;\n }\n gap = includeGap ? this.lineGap : 0;\n return ((this.ascender + gap - this.decender) / 1000) * size;\n };\n return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n function Data(data) {\n this.data = data != null ? data : [];\n this.pos = 0;\n this.length = this.data.length;\n }\n Data.prototype.readByte = function() {\n return this.data[this.pos++];\n };\n Data.prototype.writeByte = function(byte) {\n return (this.data[this.pos++] = byte);\n };\n Data.prototype.readUInt32 = function() {\n var b1, b2, b3, b4;\n b1 = this.readByte() * 0x1000000;\n b2 = this.readByte() << 16;\n b3 = this.readByte() << 8;\n b4 = this.readByte();\n return b1 + b2 + b3 + b4;\n };\n Data.prototype.writeUInt32 = function(val) {\n this.writeByte((val >>> 24) & 0xff);\n this.writeByte((val >> 16) & 0xff);\n this.writeByte((val >> 8) & 0xff);\n return this.writeByte(val & 0xff);\n };\n Data.prototype.readInt32 = function() {\n var int;\n int = this.readUInt32();\n if (int >= 0x80000000) {\n return int - 0x100000000;\n } else {\n return int;\n }\n };\n Data.prototype.writeInt32 = function(val) {\n if (val < 0) {\n val += 0x100000000;\n }\n return this.writeUInt32(val);\n };\n Data.prototype.readUInt16 = function() {\n var b1, b2;\n b1 = this.readByte() << 8;\n b2 = this.readByte();\n return b1 | b2;\n };\n Data.prototype.writeUInt16 = function(val) {\n this.writeByte((val >> 8) & 0xff);\n return this.writeByte(val & 0xff);\n };\n Data.prototype.readInt16 = function() {\n var int;\n int = this.readUInt16();\n if (int >= 0x8000) {\n return int - 0x10000;\n } else {\n return int;\n }\n };\n Data.prototype.writeInt16 = function(val) {\n if (val < 0) {\n val += 0x10000;\n }\n return this.writeUInt16(val);\n };\n Data.prototype.readString = function(length) {\n var i, ret;\n ret = [];\n for (\n i = 0;\n 0 <= length ? i < length : i > length;\n i = 0 <= length ? ++i : --i\n ) {\n ret[i] = String.fromCharCode(this.readByte());\n }\n return ret.join(\"\");\n };\n Data.prototype.writeString = function(val) {\n var i, _ref, _results;\n _results = [];\n for (\n i = 0, _ref = val.length;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n _results.push(this.writeByte(val.charCodeAt(i)));\n }\n return _results;\n };\n /*Data.prototype.stringAt = function (pos, length) {\n this.pos = pos;\n return this.readString(length);\n };*/\n Data.prototype.readShort = function() {\n return this.readInt16();\n };\n Data.prototype.writeShort = function(val) {\n return this.writeInt16(val);\n };\n Data.prototype.readLongLong = function() {\n var b1, b2, b3, b4, b5, b6, b7, b8;\n b1 = this.readByte();\n b2 = this.readByte();\n b3 = this.readByte();\n b4 = this.readByte();\n b5 = this.readByte();\n b6 = this.readByte();\n b7 = this.readByte();\n b8 = this.readByte();\n if (b1 & 0x80) {\n return (\n ((b1 ^ 0xff) * 0x100000000000000 +\n (b2 ^ 0xff) * 0x1000000000000 +\n (b3 ^ 0xff) * 0x10000000000 +\n (b4 ^ 0xff) * 0x100000000 +\n (b5 ^ 0xff) * 0x1000000 +\n (b6 ^ 0xff) * 0x10000 +\n (b7 ^ 0xff) * 0x100 +\n (b8 ^ 0xff) +\n 1) *\n -1\n );\n }\n return (\n b1 * 0x100000000000000 +\n b2 * 0x1000000000000 +\n b3 * 0x10000000000 +\n b4 * 0x100000000 +\n b5 * 0x1000000 +\n b6 * 0x10000 +\n b7 * 0x100 +\n b8\n );\n };\n Data.prototype.writeLongLong = function(val) {\n var high, low;\n high = Math.floor(val / 0x100000000);\n low = val & 0xffffffff;\n this.writeByte((high >> 24) & 0xff);\n this.writeByte((high >> 16) & 0xff);\n this.writeByte((high >> 8) & 0xff);\n this.writeByte(high & 0xff);\n this.writeByte((low >> 24) & 0xff);\n this.writeByte((low >> 16) & 0xff);\n this.writeByte((low >> 8) & 0xff);\n return this.writeByte(low & 0xff);\n };\n Data.prototype.readInt = function() {\n return this.readInt32();\n };\n Data.prototype.writeInt = function(val) {\n return this.writeInt32(val);\n };\n /*Data.prototype.slice = function (start, end) {\n return this.data.slice(start, end);\n };*/\n Data.prototype.read = function(bytes) {\n var buf, i;\n buf = [];\n for (\n i = 0;\n 0 <= bytes ? i < bytes : i > bytes;\n i = 0 <= bytes ? ++i : --i\n ) {\n buf.push(this.readByte());\n }\n return buf;\n };\n Data.prototype.write = function(bytes) {\n var byte, i, _len, _results;\n _results = [];\n for (i = 0, _len = bytes.length; i < _len; i++) {\n byte = bytes[i];\n _results.push(this.writeByte(byte));\n }\n return _results;\n };\n return Data;\n})();\n\nvar Directory = (function() {\n var checksum;\n\n /*****************************************************************************************************/\n /* function : Directory generator */\n /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n /*****************************************************************************************************/\n function Directory(data) {\n var entry, i, _ref;\n this.scalarType = data.readInt();\n this.tableCount = data.readShort();\n this.searchRange = data.readShort();\n this.entrySelector = data.readShort();\n this.rangeShift = data.readShort();\n this.tables = {};\n for (\n i = 0, _ref = this.tableCount;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n entry = {\n tag: data.readString(4),\n checksum: data.readInt(),\n offset: data.readInt(),\n length: data.readInt()\n };\n this.tables[entry.tag] = entry;\n }\n }\n /********************************************************************************************************/\n /* function : encode */\n /* comment : It encodes and stores the font table object and information used for the directory object. */\n /********************************************************************************************************/\n Directory.prototype.encode = function(tables) {\n var adjustment,\n directory,\n directoryLength,\n entrySelector,\n headOffset,\n log2,\n offset,\n rangeShift,\n searchRange,\n sum,\n table,\n tableCount,\n tableData,\n tag;\n tableCount = Object.keys(tables).length;\n log2 = Math.log(2);\n searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n entrySelector = Math.floor(searchRange / log2);\n rangeShift = tableCount * 16 - searchRange;\n directory = new Data();\n directory.writeInt(this.scalarType);\n directory.writeShort(tableCount);\n directory.writeShort(searchRange);\n directory.writeShort(entrySelector);\n directory.writeShort(rangeShift);\n directoryLength = tableCount * 16;\n offset = directory.pos + directoryLength;\n headOffset = null;\n tableData = [];\n for (tag in tables) {\n table = tables[tag];\n directory.writeString(tag);\n directory.writeInt(checksum(table));\n directory.writeInt(offset);\n directory.writeInt(table.length);\n tableData = tableData.concat(table);\n if (tag === \"head\") {\n headOffset = offset;\n }\n offset += table.length;\n while (offset % 4) {\n tableData.push(0);\n offset++;\n }\n }\n directory.write(tableData);\n sum = checksum(directory.data);\n adjustment = 0xb1b0afba - sum;\n directory.pos = headOffset + 8;\n directory.writeUInt32(adjustment);\n return directory.data;\n };\n /***************************************************************/\n /* function : checksum */\n /* comment : Duplicate the table for the tag. */\n /***************************************************************/\n checksum = function(data) {\n var i, sum, tmp, _ref;\n data = __slice.call(data);\n while (data.length % 4) {\n data.push(0);\n }\n tmp = new Data(data);\n sum = 0;\n for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n sum += tmp.readUInt32();\n }\n return sum & 0xffffffff;\n };\n return Directory;\n})();\n\nvar Table,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) {\n for (var key in parent) {\n if (__hasProp.call(parent, key)) child[key] = parent[key];\n }\n\n function ctor() {\n this.constructor = child;\n }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n child.__super__ = parent.prototype;\n return child;\n };\n\n/***************************************************************/\n/* function : Table */\n/* comment : Save info for each table, and parse the table. */\n/***************************************************************/\nTable = (function() {\n function Table(file) {\n var info;\n this.file = file;\n info = this.file.directory.tables[this.tag];\n this.exists = !!info;\n if (info) {\n (this.offset = info.offset), (this.length = info.length);\n this.parse(this.file.contents);\n }\n }\n Table.prototype.parse = function() {};\n Table.prototype.encode = function() {};\n Table.prototype.raw = function() {\n if (!this.exists) {\n return null;\n }\n this.file.contents.pos = this.offset;\n return this.file.contents.read(this.length);\n };\n return Table;\n})();\n\nvar HeadTable = (function(_super) {\n __extends(HeadTable, _super);\n\n function HeadTable() {\n return HeadTable.__super__.constructor.apply(this, arguments);\n }\n HeadTable.prototype.tag = \"head\";\n HeadTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.revision = data.readInt();\n this.checkSumAdjustment = data.readInt();\n this.magicNumber = data.readInt();\n this.flags = data.readShort();\n this.unitsPerEm = data.readShort();\n this.created = data.readLongLong();\n this.modified = data.readLongLong();\n this.xMin = data.readShort();\n this.yMin = data.readShort();\n this.xMax = data.readShort();\n this.yMax = data.readShort();\n this.macStyle = data.readShort();\n this.lowestRecPPEM = data.readShort();\n this.fontDirectionHint = data.readShort();\n this.indexToLocFormat = data.readShort();\n return (this.glyphDataFormat = data.readShort());\n };\n HeadTable.prototype.encode = function(indexToLocFormat) {\n var table;\n table = new Data();\n table.writeInt(this.version);\n table.writeInt(this.revision);\n table.writeInt(this.checkSumAdjustment);\n table.writeInt(this.magicNumber);\n table.writeShort(this.flags);\n table.writeShort(this.unitsPerEm);\n table.writeLongLong(this.created);\n table.writeLongLong(this.modified);\n table.writeShort(this.xMin);\n table.writeShort(this.yMin);\n table.writeShort(this.xMax);\n table.writeShort(this.yMax);\n table.writeShort(this.macStyle);\n table.writeShort(this.lowestRecPPEM);\n table.writeShort(this.fontDirectionHint);\n table.writeShort(indexToLocFormat);\n table.writeShort(this.glyphDataFormat);\n return table.data;\n };\n return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n function CmapEntry(data, offset) {\n var code,\n count,\n endCode,\n glyphId,\n glyphIds,\n i,\n idDelta,\n idRangeOffset,\n index,\n saveOffset,\n segCount,\n segCountX2,\n start,\n startCode,\n tail,\n _j,\n _k,\n _len;\n this.platformID = data.readUInt16();\n this.encodingID = data.readShort();\n this.offset = offset + data.readInt();\n saveOffset = data.pos;\n data.pos = this.offset;\n this.format = data.readUInt16();\n this.length = data.readUInt16();\n this.language = data.readUInt16();\n this.isUnicode =\n (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n (this.platformID === 0 && this.format === 4);\n this.codeMap = {};\n switch (this.format) {\n case 0:\n for (i = 0; i < 256; ++i) {\n this.codeMap[i] = data.readByte();\n }\n break;\n case 4:\n segCountX2 = data.readUInt16();\n segCount = segCountX2 / 2;\n data.pos += 6;\n endCode = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n data.pos += 2;\n startCode = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n idDelta = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n idRangeOffset = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n count = (this.length - data.pos + this.offset) / 2;\n glyphIds = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= count ? _j < count : _j > count;\n i = 0 <= count ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n tail = endCode[i];\n start = startCode[i];\n for (\n code = _k = start;\n start <= tail ? _k <= tail : _k >= tail;\n code = start <= tail ? ++_k : --_k\n ) {\n if (idRangeOffset[i] === 0) {\n glyphId = code + idDelta[i];\n } else {\n index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n glyphId = glyphIds[index] || 0;\n if (glyphId !== 0) {\n glyphId += idDelta[i];\n }\n }\n this.codeMap[code] = glyphId & 0xffff;\n }\n }\n }\n data.pos = saveOffset;\n }\n CmapEntry.encode = function(charmap, encoding) {\n var charMap,\n code,\n codeMap,\n codes,\n delta,\n deltas,\n diff,\n endCode,\n endCodes,\n entrySelector,\n glyphIDs,\n i,\n id,\n indexes,\n last,\n map,\n nextID,\n offset,\n old,\n rangeOffsets,\n rangeShift,\n searchRange,\n segCount,\n segCountX2,\n startCode,\n startCodes,\n startGlyph,\n subtable,\n _i,\n _j,\n _k,\n _l,\n _len,\n _len1,\n _len2,\n _len3,\n _len4,\n _len5,\n _len6,\n _len7,\n _m,\n _n,\n _name,\n _o,\n _p,\n _q;\n subtable = new Data();\n codes = Object.keys(charmap).sort(function(a, b) {\n return a - b;\n });\n switch (encoding) {\n case \"macroman\":\n id = 0;\n indexes = (function() {\n var _results = [];\n for (i = 0; i < 256; ++i) {\n _results.push(0);\n }\n return _results;\n })();\n map = {\n 0: 0\n };\n codeMap = {};\n for (_i = 0, _len = codes.length; _i < _len; _i++) {\n code = codes[_i];\n if (map[(_name = charmap[code])] == null) {\n map[_name] = ++id;\n }\n codeMap[code] = {\n old: charmap[code],\n new: map[charmap[code]]\n };\n indexes[code] = map[charmap[code]];\n }\n subtable.writeUInt16(1);\n subtable.writeUInt16(0);\n subtable.writeUInt32(12);\n subtable.writeUInt16(0);\n subtable.writeUInt16(262);\n subtable.writeUInt16(0);\n subtable.write(indexes);\n return {\n charMap: codeMap,\n subtable: subtable.data,\n maxGlyphID: id + 1\n };\n case \"unicode\":\n startCodes = [];\n endCodes = [];\n nextID = 0;\n map = {};\n charMap = {};\n last = diff = null;\n for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n code = codes[_j];\n old = charmap[code];\n if (map[old] == null) {\n map[old] = ++nextID;\n }\n charMap[code] = {\n old: old,\n new: map[old]\n };\n delta = map[old] - code;\n if (last == null || delta !== diff) {\n if (last) {\n endCodes.push(last);\n }\n startCodes.push(code);\n diff = delta;\n }\n last = code;\n }\n if (last) {\n endCodes.push(last);\n }\n endCodes.push(0xffff);\n startCodes.push(0xffff);\n segCount = startCodes.length;\n segCountX2 = segCount * 2;\n searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n entrySelector = Math.log(searchRange / 2) / Math.LN2;\n rangeShift = 2 * segCount - searchRange;\n deltas = [];\n rangeOffsets = [];\n glyphIDs = [];\n for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n startCode = startCodes[i];\n endCode = endCodes[i];\n if (startCode === 0xffff) {\n deltas.push(0);\n rangeOffsets.push(0);\n break;\n }\n startGlyph = charMap[startCode][\"new\"];\n if (startCode - startGlyph >= 0x8000) {\n deltas.push(0);\n rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n for (\n code = _l = startCode;\n startCode <= endCode ? _l <= endCode : _l >= endCode;\n code = startCode <= endCode ? ++_l : --_l\n ) {\n glyphIDs.push(charMap[code][\"new\"]);\n }\n } else {\n deltas.push(startGlyph - startCode);\n rangeOffsets.push(0);\n }\n }\n subtable.writeUInt16(3);\n subtable.writeUInt16(1);\n subtable.writeUInt32(12);\n subtable.writeUInt16(4);\n subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n subtable.writeUInt16(0);\n subtable.writeUInt16(segCountX2);\n subtable.writeUInt16(searchRange);\n subtable.writeUInt16(entrySelector);\n subtable.writeUInt16(rangeShift);\n for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n code = endCodes[_m];\n subtable.writeUInt16(code);\n }\n subtable.writeUInt16(0);\n for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n code = startCodes[_n];\n subtable.writeUInt16(code);\n }\n for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n delta = deltas[_o];\n subtable.writeUInt16(delta);\n }\n for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n offset = rangeOffsets[_p];\n subtable.writeUInt16(offset);\n }\n for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n id = glyphIDs[_q];\n subtable.writeUInt16(id);\n }\n return {\n charMap: charMap,\n subtable: subtable.data,\n maxGlyphID: nextID + 1\n };\n }\n };\n return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n __extends(CmapTable, _super);\n\n function CmapTable() {\n return CmapTable.__super__.constructor.apply(this, arguments);\n }\n CmapTable.prototype.tag = \"cmap\";\n CmapTable.prototype.parse = function(data) {\n var entry, i, tableCount;\n data.pos = this.offset;\n this.version = data.readUInt16();\n tableCount = data.readUInt16();\n this.tables = [];\n this.unicode = null;\n for (\n i = 0;\n 0 <= tableCount ? i < tableCount : i > tableCount;\n i = 0 <= tableCount ? ++i : --i\n ) {\n entry = new CmapEntry(data, this.offset);\n this.tables.push(entry);\n if (entry.isUnicode) {\n if (this.unicode == null) {\n this.unicode = entry;\n }\n }\n }\n return true;\n };\n /*************************************************************************/\n /* function : encode */\n /* comment : Encode the cmap table corresponding to the input character. */\n /*************************************************************************/\n CmapTable.encode = function(charmap, encoding) {\n var result, table;\n if (encoding == null) {\n encoding = \"macroman\";\n }\n result = CmapEntry.encode(charmap, encoding);\n table = new Data();\n table.writeUInt16(0);\n table.writeUInt16(1);\n result.table = table.data.concat(result.subtable);\n return result;\n };\n return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n __extends(HheaTable, _super);\n\n function HheaTable() {\n return HheaTable.__super__.constructor.apply(this, arguments);\n }\n HheaTable.prototype.tag = \"hhea\";\n HheaTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.ascender = data.readShort();\n this.decender = data.readShort();\n this.lineGap = data.readShort();\n this.advanceWidthMax = data.readShort();\n this.minLeftSideBearing = data.readShort();\n this.minRightSideBearing = data.readShort();\n this.xMaxExtent = data.readShort();\n this.caretSlopeRise = data.readShort();\n this.caretSlopeRun = data.readShort();\n this.caretOffset = data.readShort();\n data.pos += 4 * 2;\n this.metricDataFormat = data.readShort();\n return (this.numberOfMetrics = data.readUInt16());\n };\n /*HheaTable.prototype.encode = function (ids) {\n var i, table, _i, _ref;\n table = new Data;\n table.writeInt(this.version);\n table.writeShort(this.ascender);\n table.writeShort(this.decender);\n table.writeShort(this.lineGap);\n table.writeShort(this.advanceWidthMax);\n table.writeShort(this.minLeftSideBearing);\n table.writeShort(this.minRightSideBearing);\n table.writeShort(this.xMaxExtent);\n table.writeShort(this.caretSlopeRise);\n table.writeShort(this.caretSlopeRun);\n table.writeShort(this.caretOffset);\n for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n table.writeByte(0);\n }\n table.writeShort(this.metricDataFormat);\n table.writeUInt16(ids.length);\n return table.data;\n };*/\n return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n __extends(OS2Table, _super);\n\n function OS2Table() {\n return OS2Table.__super__.constructor.apply(this, arguments);\n }\n OS2Table.prototype.tag = \"OS/2\";\n OS2Table.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readUInt16();\n this.averageCharWidth = data.readShort();\n this.weightClass = data.readUInt16();\n this.widthClass = data.readUInt16();\n this.type = data.readShort();\n this.ySubscriptXSize = data.readShort();\n this.ySubscriptYSize = data.readShort();\n this.ySubscriptXOffset = data.readShort();\n this.ySubscriptYOffset = data.readShort();\n this.ySuperscriptXSize = data.readShort();\n this.ySuperscriptYSize = data.readShort();\n this.ySuperscriptXOffset = data.readShort();\n this.ySuperscriptYOffset = data.readShort();\n this.yStrikeoutSize = data.readShort();\n this.yStrikeoutPosition = data.readShort();\n this.familyClass = data.readShort();\n this.panose = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 10; ++i) {\n _results.push(data.readByte());\n }\n return _results;\n })();\n this.charRange = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 4; ++i) {\n _results.push(data.readInt());\n }\n return _results;\n })();\n this.vendorID = data.readString(4);\n this.selection = data.readShort();\n this.firstCharIndex = data.readShort();\n this.lastCharIndex = data.readShort();\n if (this.version > 0) {\n this.ascent = data.readShort();\n this.descent = data.readShort();\n this.lineGap = data.readShort();\n this.winAscent = data.readShort();\n this.winDescent = data.readShort();\n this.codePageRange = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 2; i = ++i) {\n _results.push(data.readInt());\n }\n return _results;\n })();\n if (this.version > 1) {\n this.xHeight = data.readShort();\n this.capHeight = data.readShort();\n this.defaultChar = data.readShort();\n this.breakChar = data.readShort();\n return (this.maxContext = data.readShort());\n }\n }\n };\n /*OS2Table.prototype.encode = function () {\n return this.raw();\n };*/\n return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n var POSTSCRIPT_GLYPHS;\n __extends(PostTable, _super);\n\n function PostTable() {\n return PostTable.__super__.constructor.apply(this, arguments);\n }\n PostTable.prototype.tag = \"post\";\n PostTable.prototype.parse = function(data) {\n var length, numberOfGlyphs, _results;\n data.pos = this.offset;\n this.format = data.readInt();\n this.italicAngle = data.readInt();\n this.underlinePosition = data.readShort();\n this.underlineThickness = data.readShort();\n this.isFixedPitch = data.readInt();\n this.minMemType42 = data.readInt();\n this.maxMemType42 = data.readInt();\n this.minMemType1 = data.readInt();\n this.maxMemType1 = data.readInt();\n switch (this.format) {\n case 0x00010000:\n break;\n case 0x00020000:\n numberOfGlyphs = data.readUInt16();\n this.glyphNameIndex = [];\n var i;\n for (\n i = 0;\n 0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n i = 0 <= numberOfGlyphs ? ++i : --i\n ) {\n this.glyphNameIndex.push(data.readUInt16());\n }\n this.names = [];\n _results = [];\n while (data.pos < this.offset + this.length) {\n length = data.readByte();\n _results.push(this.names.push(data.readString(length)));\n }\n return _results;\n case 0x00025000:\n numberOfGlyphs = data.readUInt16();\n return (this.offsets = data.read(numberOfGlyphs));\n case 0x00030000:\n break;\n case 0x00040000:\n return (this.map = function() {\n var _j, _ref, _results1;\n _results1 = [];\n for (\n i = _j = 0, _ref = this.file.maxp.numGlyphs;\n 0 <= _ref ? _j < _ref : _j > _ref;\n i = 0 <= _ref ? ++_j : --_j\n ) {\n _results1.push(data.readUInt32());\n }\n return _results1;\n }.call(this));\n }\n };\n /*PostTable.prototype.glyphFor = function (code) {\n var index;\n switch (this.format) {\n case 0x00010000:\n return POSTSCRIPT_GLYPHS[code] || '.notdef';\n case 0x00020000:\n index = this.glyphNameIndex[code];\n if (index <= 257) {\n return POSTSCRIPT_GLYPHS[index];\n }\n else {\n return this.names[index - 258] || '.notdef';\n }\n break;\n case 0x00025000:\n return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n case 0x00030000:\n return '.notdef';\n case 0x00040000:\n return this.map[code] || 0xFFFF;\n }\n };*/\n /*PostTable.prototype.encode = function (mapping) {\n var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n if (!this.exists) {\n return null;\n }\n raw = this.raw();\n if (this.format === 0x00030000) {\n return raw;\n }\n table = new Data(raw.slice(0, 32));\n table.writeUInt32(0x00020000);\n table.pos = 32;\n indexes = [];\n strings = [];\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n post = this.glyphFor(id);\n position = POSTSCRIPT_GLYPHS.indexOf(post);\n if (position !== -1) {\n indexes.push(position);\n }\n else {\n indexes.push(257 + strings.length);\n strings.push(post);\n }\n }\n table.writeUInt16(Object.keys(mapping).length);\n for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n index = indexes[_j];\n table.writeUInt16(index);\n }\n for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n string = strings[_k];\n table.writeByte(string.length);\n table.writeString(string);\n }\n return table.data;\n };*/\n POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n /\\s+/g\n );\n return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n function NameEntry(raw, entry) {\n this.raw = raw;\n this.length = raw.length;\n this.platformID = entry.platformID;\n this.encodingID = entry.encodingID;\n this.languageID = entry.languageID;\n }\n return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n var subsetTag;\n __extends(NameTable, _super);\n\n function NameTable() {\n return NameTable.__super__.constructor.apply(this, arguments);\n }\n NameTable.prototype.tag = \"name\";\n NameTable.prototype.parse = function(data) {\n var count,\n entries,\n entry,\n i,\n name,\n stringOffset,\n strings,\n text,\n _j,\n _len,\n _name;\n data.pos = this.offset;\n data.readShort(); //format\n count = data.readShort();\n stringOffset = data.readShort();\n entries = [];\n for (\n i = 0;\n 0 <= count ? i < count : i > count;\n i = 0 <= count ? ++i : --i\n ) {\n entries.push({\n platformID: data.readShort(),\n encodingID: data.readShort(),\n languageID: data.readShort(),\n nameID: data.readShort(),\n length: data.readShort(),\n offset: this.offset + stringOffset + data.readShort()\n });\n }\n strings = {};\n for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n entry = entries[i];\n data.pos = entry.offset;\n text = data.readString(entry.length);\n name = new NameEntry(text, entry);\n if (strings[(_name = entry.nameID)] == null) {\n strings[_name] = [];\n }\n strings[entry.nameID].push(name);\n }\n this.strings = strings;\n this.copyright = strings[0];\n this.fontFamily = strings[1];\n this.fontSubfamily = strings[2];\n this.uniqueSubfamily = strings[3];\n this.fontName = strings[4];\n this.version = strings[5];\n try {\n this.postscriptName = strings[6][0].raw.replace(\n /[\\x00-\\x19\\x80-\\xff]/g,\n \"\"\n );\n } catch (e) {\n this.postscriptName = strings[4][0].raw.replace(\n /[\\x00-\\x19\\x80-\\xff]/g,\n \"\"\n );\n }\n this.trademark = strings[7];\n this.manufacturer = strings[8];\n this.designer = strings[9];\n this.description = strings[10];\n this.vendorUrl = strings[11];\n this.designerUrl = strings[12];\n this.license = strings[13];\n this.licenseUrl = strings[14];\n this.preferredFamily = strings[15];\n this.preferredSubfamily = strings[17];\n this.compatibleFull = strings[18];\n return (this.sampleText = strings[19]);\n };\n subsetTag = \"AAAAAA\";\n /*NameTable.prototype.encode = function () {\n var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n strings = {};\n _ref = this.strings;\n for (id in _ref) {\n val = _ref[id];\n strings[id] = val;\n }\n postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n platformID: 1\n , encodingID: 0\n , languageID: 0\n });\n strings[6] = [postscriptName];\n subsetTag = successorOf(subsetTag);\n strCount = 0;\n for (id in strings) {\n list = strings[id];\n if (list != null) {\n strCount += list.length;\n }\n }\n table = new Data;\n strTable = new Data;\n table.writeShort(0);\n table.writeShort(strCount);\n table.writeShort(6 + 12 * strCount);\n for (nameID in strings) {\n list = strings[nameID];\n if (list != null) {\n for (_i = 0, _len = list.length; _i < _len; _i++) {\n string = list[_i];\n table.writeShort(string.platformID);\n table.writeShort(string.encodingID);\n table.writeShort(string.languageID);\n table.writeShort(nameID);\n table.writeShort(string.length);\n table.writeShort(strTable.pos);\n strTable.writeString(string.raw);\n }\n }\n }\n return nameTable = {\n postscriptName: postscriptName.raw\n , table: table.data.concat(strTable.data)\n };\n };*/\n return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n __extends(MaxpTable, _super);\n\n function MaxpTable() {\n return MaxpTable.__super__.constructor.apply(this, arguments);\n }\n MaxpTable.prototype.tag = \"maxp\";\n MaxpTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.numGlyphs = data.readUInt16();\n this.maxPoints = data.readUInt16();\n this.maxContours = data.readUInt16();\n this.maxCompositePoints = data.readUInt16();\n this.maxComponentContours = data.readUInt16();\n this.maxZones = data.readUInt16();\n this.maxTwilightPoints = data.readUInt16();\n this.maxStorage = data.readUInt16();\n this.maxFunctionDefs = data.readUInt16();\n this.maxInstructionDefs = data.readUInt16();\n this.maxStackElements = data.readUInt16();\n this.maxSizeOfInstructions = data.readUInt16();\n this.maxComponentElements = data.readUInt16();\n return (this.maxComponentDepth = data.readUInt16());\n };\n /*MaxpTable.prototype.encode = function (ids) {\n var table;\n table = new Data;\n table.writeInt(this.version);\n table.writeUInt16(ids.length);\n table.writeUInt16(this.maxPoints);\n table.writeUInt16(this.maxContours);\n table.writeUInt16(this.maxCompositePoints);\n table.writeUInt16(this.maxComponentContours);\n table.writeUInt16(this.maxZones);\n table.writeUInt16(this.maxTwilightPoints);\n table.writeUInt16(this.maxStorage);\n table.writeUInt16(this.maxFunctionDefs);\n table.writeUInt16(this.maxInstructionDefs);\n table.writeUInt16(this.maxStackElements);\n table.writeUInt16(this.maxSizeOfInstructions);\n table.writeUInt16(this.maxComponentElements);\n table.writeUInt16(this.maxComponentDepth);\n return table.data;\n };*/\n return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n __extends(HmtxTable, _super);\n\n function HmtxTable() {\n return HmtxTable.__super__.constructor.apply(this, arguments);\n }\n HmtxTable.prototype.tag = \"hmtx\";\n HmtxTable.prototype.parse = function(data) {\n var i, last, lsbCount, m, _j, _ref, _results;\n data.pos = this.offset;\n this.metrics = [];\n for (\n i = 0, _ref = this.file.hhea.numberOfMetrics;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n this.metrics.push({\n advance: data.readUInt16(),\n lsb: data.readInt16()\n });\n }\n lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n this.leftSideBearings = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n i = 0 <= lsbCount ? ++_j : --_j\n ) {\n _results.push(data.readInt16());\n }\n return _results;\n })();\n this.widths = function() {\n var _j, _len, _ref1, _results;\n _ref1 = this.metrics;\n _results = [];\n for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n m = _ref1[_j];\n _results.push(m.advance);\n }\n return _results;\n }.call(this);\n last = this.widths[this.widths.length - 1];\n _results = [];\n for (\n i = _j = 0;\n 0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n i = 0 <= lsbCount ? ++_j : --_j\n ) {\n _results.push(this.widths.push(last));\n }\n return _results;\n };\n /***************************************************************/\n /* function : forGlyph */\n /* comment : Returns the advance width and lsb for this glyph. */\n /***************************************************************/\n HmtxTable.prototype.forGlyph = function(id) {\n if (id in this.metrics) {\n return this.metrics[id];\n }\n return {\n advance: this.metrics[this.metrics.length - 1].advance,\n lsb: this.leftSideBearings[id - this.metrics.length]\n };\n };\n /*HmtxTable.prototype.encode = function (mapping) {\n var id, metric, table, _i, _len;\n table = new Data;\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n metric = this.forGlyph(id);\n table.writeUInt16(metric.advance);\n table.writeUInt16(metric.lsb);\n }\n return table.data;\n };*/\n return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n __extends(GlyfTable, _super);\n\n function GlyfTable() {\n return GlyfTable.__super__.constructor.apply(this, arguments);\n }\n GlyfTable.prototype.tag = \"glyf\";\n GlyfTable.prototype.parse = function() {\n return (this.cache = {});\n };\n GlyfTable.prototype.glyphFor = function(id) {\n var data,\n index,\n length,\n loca,\n numberOfContours,\n raw,\n xMax,\n xMin,\n yMax,\n yMin;\n if (id in this.cache) {\n return this.cache[id];\n }\n loca = this.file.loca;\n data = this.file.contents;\n index = loca.indexOf(id);\n length = loca.lengthOf(id);\n if (length === 0) {\n return (this.cache[id] = null);\n }\n data.pos = this.offset + index;\n raw = new Data(data.read(length));\n numberOfContours = raw.readShort();\n xMin = raw.readShort();\n yMin = raw.readShort();\n xMax = raw.readShort();\n yMax = raw.readShort();\n if (numberOfContours === -1) {\n this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n } else {\n this.cache[id] = new SimpleGlyph(\n raw,\n numberOfContours,\n xMin,\n yMin,\n xMax,\n yMax\n );\n }\n return this.cache[id];\n };\n GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n var glyph, id, offsets, table, _i, _len;\n table = [];\n offsets = [];\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n glyph = glyphs[id];\n offsets.push(table.length);\n if (glyph) {\n table = table.concat(glyph.encode(old2new));\n }\n }\n offsets.push(table.length);\n return {\n table: table,\n offsets: offsets\n };\n };\n return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n /**************************************************************************/\n /* function : SimpleGlyph */\n /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n /**************************************************************************/\n function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n this.raw = raw;\n this.numberOfContours = numberOfContours;\n this.xMin = xMin;\n this.yMin = yMin;\n this.xMax = xMax;\n this.yMax = yMax;\n this.compound = false;\n }\n SimpleGlyph.prototype.encode = function() {\n return this.raw.data;\n };\n return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n var ARG_1_AND_2_ARE_WORDS,\n MORE_COMPONENTS,\n WE_HAVE_AN_X_AND_Y_SCALE,\n WE_HAVE_A_SCALE,\n WE_HAVE_A_TWO_BY_TWO,\n WE_HAVE_INSTRUCTIONS;\n ARG_1_AND_2_ARE_WORDS = 0x0001;\n WE_HAVE_A_SCALE = 0x0008;\n MORE_COMPONENTS = 0x0020;\n WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n WE_HAVE_A_TWO_BY_TWO = 0x0080;\n WE_HAVE_INSTRUCTIONS = 0x0100;\n\n /********************************************************************************************************************/\n /* function : CompoundGlypg generator */\n /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n /********************************************************************************************************************/\n function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n var data, flags;\n this.raw = raw;\n this.xMin = xMin;\n this.yMin = yMin;\n this.xMax = xMax;\n this.yMax = yMax;\n this.compound = true;\n this.glyphIDs = [];\n this.glyphOffsets = [];\n data = this.raw;\n while (true) {\n flags = data.readShort();\n this.glyphOffsets.push(data.pos);\n this.glyphIDs.push(data.readUInt16());\n if (!(flags & MORE_COMPONENTS)) {\n break;\n }\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n data.pos += 4;\n } else {\n data.pos += 2;\n }\n if (flags & WE_HAVE_A_TWO_BY_TWO) {\n data.pos += 8;\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n data.pos += 4;\n } else if (flags & WE_HAVE_A_SCALE) {\n data.pos += 2;\n }\n }\n }\n /****************************************************************************************************************/\n /* function : CompoundGlypg encode */\n /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n /****************************************************************************************************************/\n CompoundGlyph.prototype.encode = function() {\n var i, result, _len, _ref;\n result = new Data(__slice.call(this.raw.data));\n _ref = this.glyphIDs;\n for (i = 0, _len = _ref.length; i < _len; ++i) {\n result.pos = this.glyphOffsets[i];\n }\n return result.data;\n };\n return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n __extends(LocaTable, _super);\n\n function LocaTable() {\n return LocaTable.__super__.constructor.apply(this, arguments);\n }\n LocaTable.prototype.tag = \"loca\";\n LocaTable.prototype.parse = function(data) {\n var format, i;\n data.pos = this.offset;\n format = this.file.head.indexToLocFormat;\n if (format === 0) {\n return (this.offsets = function() {\n var _ref, _results;\n _results = [];\n for (i = 0, _ref = this.length; i < _ref; i += 2) {\n _results.push(data.readUInt16() * 2);\n }\n return _results;\n }.call(this));\n } else {\n return (this.offsets = function() {\n var _ref, _results;\n _results = [];\n for (i = 0, _ref = this.length; i < _ref; i += 4) {\n _results.push(data.readUInt32());\n }\n return _results;\n }.call(this));\n }\n };\n LocaTable.prototype.indexOf = function(id) {\n return this.offsets[id];\n };\n LocaTable.prototype.lengthOf = function(id) {\n return this.offsets[id + 1] - this.offsets[id];\n };\n LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n var LocaTable = new Uint32Array(this.offsets.length);\n var glyfPtr = 0;\n var listGlyf = 0;\n for (var k = 0; k < LocaTable.length; ++k) {\n LocaTable[k] = glyfPtr;\n if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n ++listGlyf;\n LocaTable[k] = glyfPtr;\n var start = this.offsets[k];\n var len = this.offsets[k + 1] - start;\n if (len > 0) {\n glyfPtr += len;\n }\n }\n }\n var newLocaTable = new Array(LocaTable.length * 4);\n for (var j = 0; j < LocaTable.length; ++j) {\n newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n }\n return newLocaTable;\n };\n return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n var key, ret, val;\n ret = {};\n for (key in object) {\n val = object[key];\n ret[val] = key;\n }\n return ret;\n};\n\n/*var successorOf = function (input) {\n var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n alphabet = 'abcdefghijklmnopqrstuvwxyz';\n length = alphabet.length;\n result = input;\n i = input.length;\n while (i >= 0) {\n last = input.charAt(--i);\n if (isNaN(last)) {\n index = alphabet.indexOf(last.toLowerCase());\n if (index === -1) {\n next = last;\n carry = true;\n }\n else {\n next = alphabet.charAt((index + 1) % length);\n isUpperCase = last === last.toUpperCase();\n if (isUpperCase) {\n next = next.toUpperCase();\n }\n carry = index + 1 >= length;\n if (carry && i === 0) {\n added = isUpperCase ? 'A' : 'a';\n result = added + next + result.slice(1);\n break;\n }\n }\n }\n else {\n next = +last + 1;\n carry = next > 9;\n if (carry) {\n next = 0;\n }\n if (carry && i === 0) {\n result = '1' + next + result.slice(1);\n break;\n }\n }\n result = result.slice(0, i) + next + result.slice(i + 1);\n if (!carry) {\n break;\n }\n }\n return result;\n };*/\n\nvar Subset = (function() {\n function Subset(font) {\n this.font = font;\n this.subset = {};\n this.unicodes = {};\n this.next = 33;\n }\n /*Subset.prototype.use = function (character) {\n var i, _i, _ref;\n if (typeof character === 'string') {\n for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n this.use(character.charCodeAt(i));\n }\n return;\n }\n if (!this.unicodes[character]) {\n this.subset[this.next] = character;\n return this.unicodes[character] = this.next++;\n }\n };*/\n /*Subset.prototype.encodeText = function (text) {\n var char, i, string, _i, _ref;\n string = '';\n for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n char = this.unicodes[text.charCodeAt(i)];\n string += String.fromCharCode(char);\n }\n return string;\n };*/\n /***************************************************************/\n /* function : generateCmap */\n /* comment : Returns the unicode cmap for this font. */\n /***************************************************************/\n Subset.prototype.generateCmap = function() {\n var mapping, roman, unicode, unicodeCmap, _ref;\n unicodeCmap = this.font.cmap.tables[0].codeMap;\n mapping = {};\n _ref = this.subset;\n for (roman in _ref) {\n unicode = _ref[roman];\n mapping[roman] = unicodeCmap[unicode];\n }\n return mapping;\n };\n /*Subset.prototype.glyphIDs = function () {\n var ret, roman, unicode, unicodeCmap, val, _ref;\n unicodeCmap = this.font.cmap.tables[0].codeMap;\n ret = [0];\n _ref = this.subset;\n for (roman in _ref) {\n unicode = _ref[roman];\n val = unicodeCmap[unicode];\n if ((val != null) && __indexOf.call(ret, val) < 0) {\n ret.push(val);\n }\n }\n return ret.sort();\n };*/\n /******************************************************************/\n /* function : glyphsFor */\n /* comment : Returns simple glyph objects for the input character.*/\n /******************************************************************/\n Subset.prototype.glyphsFor = function(glyphIDs) {\n var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n glyphs = {};\n for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n id = glyphIDs[_i];\n glyphs[id] = this.font.glyf.glyphFor(id);\n }\n additionalIDs = [];\n for (id in glyphs) {\n glyph = glyphs[id];\n if (glyph != null ? glyph.compound : void 0) {\n additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n }\n }\n if (additionalIDs.length > 0) {\n _ref = this.glyphsFor(additionalIDs);\n for (id in _ref) {\n glyph = _ref[id];\n glyphs[id] = glyph;\n }\n }\n return glyphs;\n };\n /***************************************************************/\n /* function : encode */\n /* comment : Encode various tables for the characters you use. */\n /***************************************************************/\n Subset.prototype.encode = function(glyID, indexToLocFormat) {\n var cmap,\n code,\n glyf,\n glyphs,\n id,\n ids,\n loca,\n new2old,\n newIDs,\n nextGlyphID,\n old2new,\n oldID,\n oldIDs,\n tables,\n _ref;\n cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n glyphs = this.glyphsFor(glyID);\n old2new = {\n 0: 0\n };\n _ref = cmap.charMap;\n for (code in _ref) {\n ids = _ref[code];\n old2new[ids.old] = ids[\"new\"];\n }\n nextGlyphID = cmap.maxGlyphID;\n for (oldID in glyphs) {\n if (!(oldID in old2new)) {\n old2new[oldID] = nextGlyphID++;\n }\n }\n new2old = invert(old2new);\n newIDs = Object.keys(new2old).sort(function(a, b) {\n return a - b;\n });\n oldIDs = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n id = newIDs[_i];\n _results.push(new2old[id]);\n }\n return _results;\n })();\n glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n loca = this.font.loca.encode(glyf.offsets, oldIDs);\n tables = {\n cmap: this.font.cmap.raw(),\n glyf: glyf.table,\n loca: loca,\n hmtx: this.font.hmtx.raw(),\n hhea: this.font.hhea.raw(),\n maxp: this.font.maxp.raw(),\n post: this.font.post.raw(),\n name: this.font.name.raw(),\n head: this.font.head.encode(indexToLocFormat)\n };\n if (this.font.os2.exists) {\n tables[\"OS/2\"] = this.font.os2.raw();\n }\n return this.font.directory.encode(tables);\n };\n return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n var pad;\n\n function PDFObject() {}\n pad = function(str, length) {\n return (Array(length + 1).join(\"0\") + str).slice(-length);\n };\n /*****************************************************************************/\n /* function : convert */\n /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n /*****************************************************************************/\n PDFObject.convert = function(object) {\n var e, items, key, out, val;\n if (Array.isArray(object)) {\n items = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = object.length; _i < _len; _i++) {\n e = object[_i];\n _results.push(PDFObject.convert(e));\n }\n return _results;\n })().join(\" \");\n return \"[\" + items + \"]\";\n } else if (typeof object === \"string\") {\n return \"/\" + object;\n } else if (object != null ? object.isString : void 0) {\n return \"(\" + object + \")\";\n } else if (object instanceof Date) {\n return (\n \"(D:\" +\n pad(object.getUTCFullYear(), 4) +\n pad(object.getUTCMonth(), 2) +\n pad(object.getUTCDate(), 2) +\n pad(object.getUTCHours(), 2) +\n pad(object.getUTCMinutes(), 2) +\n pad(object.getUTCSeconds(), 2) +\n \"Z)\"\n );\n } else if ({}.toString.call(object) === \"[object Object]\") {\n out = [\"<<\"];\n for (key in object) {\n val = object[key];\n out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n }\n out.push(\">>\");\n return out.join(\"\\n\");\n } else {\n return \"\" + object;\n }\n };\n return PDFObject;\n})();\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (!options.selector && options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n var name = styleRule.key + \"-\" + prop;\n\n if ('replaceRule' in container) {\n // for backward compatibility\n container.replaceRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else {\n container.addRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n }\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport isInBrowser from 'is-in-browser';\nimport warning from 'tiny-warning';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\n\nvar plainObjectConstrurctor = {}.constructor;\nfunction cloneStyle(style) {\n if (style == null || typeof style !== 'object') return style;\n if (Array.isArray(style)) return style.map(cloneStyle);\n if (style.constructor !== plainObjectConstrurctor) return style;\n var newStyle = {};\n\n for (var name in style) {\n newStyle[name] = cloneStyle(style[name]);\n }\n\n return newStyle;\n}\n\n/**\n * Create a rule instance.\n */\n\nfunction createRule(name, decl, options) {\n if (name === void 0) {\n name = 'unnamed';\n }\n\n var jss = options.jss;\n var declCopy = cloneStyle(decl);\n var rule = jss.plugins.onCreateRule(name, declCopy, options);\n if (rule) return rule; // It is an at-rule and it has no instance.\n\n if (name[0] === '@') {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown rule \" + name) : void 0;\n }\n\n return null;\n}\n\nvar join = function join(value, by) {\n var result = '';\n\n for (var i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break;\n if (result) result += by;\n result += value[i];\n }\n\n return result;\n};\n/**\n * Converts JSS array value to a CSS string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\n\n\nvar toCssValue = function toCssValue(value) {\n if (!Array.isArray(value)) return value;\n var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.\n\n if (Array.isArray(value[0])) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === '!important') break;\n if (cssValue) cssValue += ', ';\n cssValue += join(value[i], ' ');\n }\n } else cssValue = join(value, ', '); // Add !important, because it was ignored.\n\n\n if (value[value.length - 1] === '!important') {\n cssValue += ' !important';\n }\n\n return cssValue;\n};\n\nfunction getWhitespaceSymbols(options) {\n if (options && options.format === false) {\n return {\n linebreak: '',\n space: ''\n };\n }\n\n return {\n linebreak: '\\n',\n space: ' '\n };\n}\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\n\nfunction indentStr(str, indent) {\n var result = '';\n\n for (var index = 0; index < indent; index++) {\n result += ' ';\n }\n\n return result + str;\n}\n/**\n * Converts a Rule to CSS string.\n */\n\n\nfunction toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n\n if (options.format === false) {\n indent = -Infinity;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak,\n space = _getWhitespaceSymbols.space;\n\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += linebreak;\n result += indentStr(prop + \":\" + space + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += linebreak;\n result += indentStr(_prop + \":\" + space + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += linebreak;\n result += indentStr(_prop2 + \":\" + space + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\" + linebreak + result + linebreak;\n return indentStr(\"\" + selector + space + \"{\" + result, indent) + indentStr('}', indent);\n}\n\nvar escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g;\nvar nativeEscape = typeof CSS !== 'undefined' && CSS.escape;\nvar escape = (function (str) {\n return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1');\n});\n\nvar BaseStyleRule =\n/*#__PURE__*/\nfunction () {\n function BaseStyleRule(key, style, options) {\n this.type = 'style';\n this.isProcessed = false;\n var sheet = options.sheet,\n Renderer = options.Renderer;\n this.key = key;\n this.options = options;\n this.style = style;\n if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();\n }\n /**\n * Get or set a style property.\n */\n\n\n var _proto = BaseStyleRule.prototype;\n\n _proto.prop = function prop(name, value, options) {\n // It's a getter.\n if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.\n\n var force = options ? options.force : false;\n if (!force && this.style[name] === value) return this;\n var newValue = value;\n\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this);\n }\n\n var isEmpty = newValue == null || newValue === false;\n var isDefined = name in this.style; // Value is empty and wasn't defined before.\n\n if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.\n\n var remove = isEmpty && isDefined;\n if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.\n\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);\n return this;\n }\n\n var sheet = this.options.sheet;\n\n if (sheet && sheet.attached) {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".') : void 0;\n }\n\n return this;\n };\n\n return BaseStyleRule;\n}();\nvar StyleRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(StyleRule, _BaseStyleRule);\n\n function StyleRule(key, style, options) {\n var _this;\n\n _this = _BaseStyleRule.call(this, key, style, options) || this;\n var selector = options.selector,\n scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n\n if (selector) {\n _this.selectorText = selector;\n } else if (scoped !== false) {\n _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);\n _this.selectorText = \".\" + escape(_this.id);\n }\n\n return _this;\n }\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n\n\n var _proto2 = StyleRule.prototype;\n\n /**\n * Apply rule to an element inline.\n */\n _proto2.applyTo = function applyTo(renderable) {\n var renderer = this.renderer;\n\n if (renderer) {\n var json = this.toJSON();\n\n for (var prop in json) {\n renderer.setProperty(renderable, prop, json[prop]);\n }\n }\n\n return this;\n }\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n ;\n\n _proto2.toJSON = function toJSON() {\n var json = {};\n\n for (var prop in this.style) {\n var value = this.style[prop];\n if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);\n }\n\n return json;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto2.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.selectorText, this.style, opts);\n };\n\n _createClass(StyleRule, [{\n key: \"selector\",\n set: function set(selector) {\n if (selector === this.selectorText) return;\n this.selectorText = selector;\n var renderer = this.renderer,\n renderable = this.renderable;\n if (!renderable || !renderer) return;\n var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.\n\n if (!hasChanged) {\n renderer.replaceRule(renderable, this);\n }\n }\n /**\n * Get selector string.\n */\n ,\n get: function get() {\n return this.selectorText;\n }\n }]);\n\n return StyleRule;\n}(BaseStyleRule);\nvar pluginStyleRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') {\n return null;\n }\n\n return new StyleRule(key, style, options);\n }\n};\n\nvar defaultToStringOptions = {\n indent: 1,\n children: true\n};\nvar atRegExp = /@([\\w-]+)/;\n/**\n * Conditional rule for @media, @supports\n */\n\nvar ConditionalRule =\n/*#__PURE__*/\nfunction () {\n function ConditionalRule(key, styles, options) {\n this.type = 'conditional';\n this.isProcessed = false;\n this.key = key;\n var atMatch = key.match(atRegExp);\n this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n\n this.query = options.name || \"@\" + this.at;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = ConditionalRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions.indent;\n if (options.children == null) options.children = defaultToStringOptions.children;\n\n if (options.children === false) {\n return this.query + \" {}\";\n }\n\n var children = this.rules.toString(options);\n return children ? this.query + \" {\" + linebreak + children + linebreak + \"}\" : '';\n };\n\n return ConditionalRule;\n}();\nvar keyRegExp = /@media|@supports\\s+/;\nvar pluginConditionalRule = {\n onCreateRule: function onCreateRule(key, styles, options) {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;\n }\n};\n\nvar defaultToStringOptions$1 = {\n indent: 1,\n children: true\n};\nvar nameRegExp = /@keyframes\\s+([\\w-]+)/;\n/**\n * Rule for @keyframes\n */\n\nvar KeyframesRule =\n/*#__PURE__*/\nfunction () {\n function KeyframesRule(key, frames, options) {\n this.type = 'keyframes';\n this.at = '@keyframes';\n this.isProcessed = false;\n var nameMatch = key.match(nameRegExp);\n\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1];\n } else {\n this.name = 'noname';\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Bad keyframes name \" + key) : void 0;\n }\n\n this.key = this.type + \"-\" + this.name;\n this.options = options;\n var scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n this.id = scoped === false ? this.name : escape(generateId(this, sheet));\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in frames) {\n this.rules.add(name, frames[name], _extends({}, options, {\n parent: this\n }));\n }\n\n this.rules.process();\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = KeyframesRule.prototype;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions$1;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions$1.indent;\n if (options.children == null) options.children = defaultToStringOptions$1.children;\n\n if (options.children === false) {\n return this.at + \" \" + this.id + \" {}\";\n }\n\n var children = this.rules.toString(options);\n if (children) children = \"\" + linebreak + children + linebreak;\n return this.at + \" \" + this.id + \" {\" + children + \"}\";\n };\n\n return KeyframesRule;\n}();\nvar keyRegExp$1 = /@keyframes\\s+/;\nvar refRegExp = /\\$([\\w-]+)/g;\n\nvar findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {\n if (typeof val === 'string') {\n return val.replace(refRegExp, function (match, name) {\n if (name in keyframes) {\n return keyframes[name];\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Referenced keyframes rule \\\"\" + name + \"\\\" is not defined.\") : void 0;\n return match;\n });\n }\n\n return val;\n};\n/**\n * Replace the reference for a animation name.\n */\n\n\nvar replaceRef = function replaceRef(style, prop, keyframes) {\n var value = style[prop];\n var refKeyframe = findReferencedKeyframe(value, keyframes);\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe;\n }\n};\n\nvar pluginKeyframesRule = {\n onCreateRule: function onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;\n },\n // Animation name ref replacer.\n onProcessStyle: function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style' || !sheet) return style;\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);\n return style;\n },\n onChangeValue: function onChangeValue(val, prop, rule) {\n var sheet = rule.options.sheet;\n\n if (!sheet) {\n return val;\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n default:\n return val;\n }\n }\n};\n\nvar KeyframeRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(KeyframeRule, _BaseStyleRule);\n\n function KeyframeRule() {\n return _BaseStyleRule.apply(this, arguments) || this;\n }\n\n var _proto = KeyframeRule.prototype;\n\n /**\n * Generates a CSS string.\n */\n _proto.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.key, this.style, opts);\n };\n\n return KeyframeRule;\n}(BaseStyleRule);\nvar pluginKeyframeRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options);\n }\n\n return null;\n }\n};\n\nvar FontFaceRule =\n/*#__PURE__*/\nfunction () {\n function FontFaceRule(key, style, options) {\n this.type = 'font-face';\n this.at = '@font-face';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = FontFaceRule.prototype;\n\n _proto.toString = function toString(options) {\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (Array.isArray(this.style)) {\n var str = '';\n\n for (var index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index]);\n if (this.style[index + 1]) str += linebreak;\n }\n\n return str;\n }\n\n return toCss(this.at, this.style, options);\n };\n\n return FontFaceRule;\n}();\nvar keyRegExp$2 = /@font-face/;\nvar pluginFontFaceRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;\n }\n};\n\nvar ViewportRule =\n/*#__PURE__*/\nfunction () {\n function ViewportRule(key, style, options) {\n this.type = 'viewport';\n this.at = '@viewport';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = ViewportRule.prototype;\n\n _proto.toString = function toString(options) {\n return toCss(this.key, this.style, options);\n };\n\n return ViewportRule;\n}();\nvar pluginViewportRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;\n }\n};\n\nvar SimpleRule =\n/*#__PURE__*/\nfunction () {\n function SimpleRule(key, value, options) {\n this.type = 'simple';\n this.isProcessed = false;\n this.key = key;\n this.value = value;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n\n\n var _proto = SimpleRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.value)) {\n var str = '';\n\n for (var index = 0; index < this.value.length; index++) {\n str += this.key + \" \" + this.value[index] + \";\";\n if (this.value[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return this.key + \" \" + this.value + \";\";\n };\n\n return SimpleRule;\n}();\nvar keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n};\nvar pluginSimpleRule = {\n onCreateRule: function onCreateRule(key, value, options) {\n return key in keysMap ? new SimpleRule(key, value, options) : null;\n }\n};\n\nvar plugins = [pluginStyleRule, pluginConditionalRule, pluginKeyframesRule, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];\n\nvar defaultUpdateOptions = {\n process: true\n};\nvar forceUpdateOptions = {\n force: true,\n process: true\n /**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\n\n};\n\nvar RuleList =\n/*#__PURE__*/\nfunction () {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n // Original styles object.\n // Used to ensure correct rules order.\n function RuleList(options) {\n this.map = {};\n this.raw = {};\n this.index = [];\n this.counter = 0;\n this.options = options;\n this.classes = options.classes;\n this.keyframes = options.keyframes;\n }\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n\n\n var _proto = RuleList.prototype;\n\n _proto.add = function add(name, decl, ruleOptions) {\n var _this$options = this.options,\n parent = _this$options.parent,\n sheet = _this$options.sheet,\n jss = _this$options.jss,\n Renderer = _this$options.Renderer,\n generateId = _this$options.generateId,\n scoped = _this$options.scoped;\n\n var options = _extends({\n classes: this.classes,\n parent: parent,\n sheet: sheet,\n jss: jss,\n Renderer: Renderer,\n generateId: generateId,\n scoped: scoped,\n name: name,\n keyframes: this.keyframes,\n selector: undefined\n }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n\n\n var key = name;\n\n if (name in this.raw) {\n key = name + \"-d\" + this.counter++;\n } // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n\n\n this.raw[key] = decl;\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = \".\" + escape(this.classes[key]);\n }\n\n var rule = createRule(key, decl, options);\n if (!rule) return null;\n this.register(rule);\n var index = options.index === undefined ? this.index.length : options.index;\n this.index.splice(index, 0, rule);\n return rule;\n }\n /**\n * Replace rule.\n * Create a new rule and remove old one instead of overwriting\n * because we want to invoke onCreateRule hook to make plugins work.\n */\n ;\n\n _proto.replace = function replace(name, decl, ruleOptions) {\n var oldRule = this.get(name);\n var oldIndex = this.index.indexOf(oldRule);\n\n if (oldRule) {\n this.remove(oldRule);\n }\n\n var options = ruleOptions;\n if (oldIndex !== -1) options = _extends({}, ruleOptions, {\n index: oldIndex\n });\n return this.add(name, decl, options);\n }\n /**\n * Get a rule by name or selector.\n */\n ;\n\n _proto.get = function get(nameOrSelector) {\n return this.map[nameOrSelector];\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.remove = function remove(rule) {\n this.unregister(rule);\n delete this.raw[rule.key];\n this.index.splice(this.index.indexOf(rule), 1);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.index.indexOf(rule);\n }\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n ;\n\n _proto.process = function process() {\n var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n\n this.index.slice(0).forEach(plugins.onProcessRule, plugins);\n }\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n ;\n\n _proto.register = function register(rule) {\n this.map[rule.key] = rule;\n\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule;\n if (rule.id) this.classes[rule.key] = rule.id;\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id;\n }\n }\n /**\n * Unregister a rule.\n */\n ;\n\n _proto.unregister = function unregister(rule) {\n delete this.map[rule.key];\n\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector];\n delete this.classes[rule.key];\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name];\n }\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var name;\n var data;\n var options;\n\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n name = arguments.length <= 0 ? undefined : arguments[0];\n data = arguments.length <= 1 ? undefined : arguments[1];\n options = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n data = arguments.length <= 0 ? undefined : arguments[0];\n options = arguments.length <= 1 ? undefined : arguments[1];\n name = null;\n }\n\n if (name) {\n this.updateOne(this.get(name), data, options);\n } else {\n for (var index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options);\n }\n }\n }\n /**\n * Execute plugins, update rule props.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n if (options === void 0) {\n options = defaultUpdateOptions;\n }\n\n var _this$options2 = this.options,\n plugins = _this$options2.jss.plugins,\n sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule.\n\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options);\n return;\n }\n\n var style = rule.style;\n plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n\n if (options.process && style && style !== rule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(rule.style, rule, sheet); // Update and add props.\n\n for (var prop in rule.style) {\n var nextValue = rule.style[prop];\n var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (nextValue !== prevValue) {\n rule.prop(prop, nextValue, forceUpdateOptions);\n }\n } // Remove props.\n\n\n for (var _prop in style) {\n var _nextValue = rule.style[_prop];\n var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (_nextValue == null && _nextValue !== _prevValue) {\n rule.prop(_prop, null, forceUpdateOptions);\n }\n }\n }\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n var str = '';\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n for (var index = 0; index < this.index.length; index++) {\n var rule = this.index[index];\n var css = rule.toString(options); // No need to render an empty rule.\n\n if (!css && !link) continue;\n if (str) str += linebreak;\n str += css;\n }\n\n return str;\n };\n\n return RuleList;\n}();\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(styles, options) {\n this.attached = false;\n this.deployed = false;\n this.classes = {};\n this.keyframes = {};\n this.options = _extends({}, options, {\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n });\n\n if (options.Renderer) {\n this.renderer = new options.Renderer(this);\n }\n\n this.rules = new RuleList(this.options);\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Attach renderable to the render tree.\n */\n\n\n var _proto = StyleSheet.prototype;\n\n _proto.attach = function attach() {\n if (this.attached) return this;\n if (this.renderer) this.renderer.attach();\n this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached.\n\n if (!this.deployed) this.deploy();\n return this;\n }\n /**\n * Remove renderable from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.attached) return this;\n if (this.renderer) this.renderer.detach();\n this.attached = false;\n return this;\n }\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n ;\n\n _proto.addRule = function addRule(name, decl, options) {\n var queue = this.queue; // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n\n if (this.attached && !queue) this.queue = [];\n var rule = this.rules.add(name, decl, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n\n if (this.attached) {\n if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (queue) queue.push(rule);else {\n this.insertRule(rule);\n\n if (this.queue) {\n this.queue.forEach(this.insertRule, this);\n this.queue = undefined;\n }\n }\n return rule;\n } // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return rule;\n }\n /**\n * Replace a rule in the current stylesheet.\n */\n ;\n\n _proto.replaceRule = function replaceRule(nameOrSelector, decl, options) {\n var oldRule = this.rules.get(nameOrSelector);\n if (!oldRule) return this.addRule(nameOrSelector, decl, options);\n var newRule = this.rules.replace(nameOrSelector, decl, options);\n\n if (newRule) {\n this.options.jss.plugins.onProcessRule(newRule);\n }\n\n if (this.attached) {\n if (!this.deployed) return newRule; // Don't replace / delete rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (this.renderer) {\n if (!newRule) {\n this.renderer.deleteRule(oldRule);\n } else if (oldRule.renderable) {\n this.renderer.replaceRule(oldRule.renderable, newRule);\n }\n }\n\n return newRule;\n } // We can't replace rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return newRule;\n }\n /**\n * Insert rule into the StyleSheet\n */\n ;\n\n _proto.insertRule = function insertRule(rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule);\n }\n }\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n ;\n\n _proto.addRules = function addRules(styles, options) {\n var added = [];\n\n for (var name in styles) {\n var rule = this.addRule(name, styles[name], options);\n if (rule) added.push(rule);\n }\n\n return added;\n }\n /**\n * Get a rule by name or selector.\n */\n ;\n\n _proto.getRule = function getRule(nameOrSelector) {\n return this.rules.get(nameOrSelector);\n }\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n ;\n\n _proto.deleteRule = function deleteRule(name) {\n var rule = typeof name === 'object' ? name : this.rules.get(name);\n\n if (!rule || // Style sheet was created without link: true and attached, in this case we\n // won't be able to remove the CSS rule from the DOM.\n this.attached && !rule.renderable) {\n return false;\n }\n\n this.rules.remove(rule);\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable);\n }\n\n return true;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Deploy pure CSS string to a renderable.\n */\n ;\n\n _proto.deploy = function deploy() {\n if (this.renderer) this.renderer.deploy();\n this.deployed = true;\n return this;\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var _this$rules;\n\n (_this$rules = this.rules).update.apply(_this$rules, arguments);\n\n return this;\n }\n /**\n * Updates a single rule.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n this.rules.updateOne(rule, data, options);\n return this;\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return StyleSheet;\n}();\n\nvar PluginsRegistry =\n/*#__PURE__*/\nfunction () {\n function PluginsRegistry() {\n this.plugins = {\n internal: [],\n external: []\n };\n this.registry = {};\n }\n\n var _proto = PluginsRegistry.prototype;\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n _proto.onCreateRule = function onCreateRule(name, decl, options) {\n for (var i = 0; i < this.registry.onCreateRule.length; i++) {\n var rule = this.registry.onCreateRule[i](name, decl, options);\n if (rule) return rule;\n }\n\n return null;\n }\n /**\n * Call `onProcessRule` hooks.\n */\n ;\n\n _proto.onProcessRule = function onProcessRule(rule) {\n if (rule.isProcessed) return;\n var sheet = rule.options.sheet;\n\n for (var i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet);\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet);\n rule.isProcessed = true;\n }\n /**\n * Call `onProcessStyle` hooks.\n */\n ;\n\n _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {\n for (var i = 0; i < this.registry.onProcessStyle.length; i++) {\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);\n }\n }\n /**\n * Call `onProcessSheet` hooks.\n */\n ;\n\n _proto.onProcessSheet = function onProcessSheet(sheet) {\n for (var i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet);\n }\n }\n /**\n * Call `onUpdate` hooks.\n */\n ;\n\n _proto.onUpdate = function onUpdate(data, rule, sheet, options) {\n for (var i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options);\n }\n }\n /**\n * Call `onChangeValue` hooks.\n */\n ;\n\n _proto.onChangeValue = function onChangeValue(value, prop, rule) {\n var processedValue = value;\n\n for (var i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);\n }\n\n return processedValue;\n }\n /**\n * Register a plugin.\n */\n ;\n\n _proto.use = function use(newPlugin, options) {\n if (options === void 0) {\n options = {\n queue: 'external'\n };\n }\n\n var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref.\n\n if (plugins.indexOf(newPlugin) !== -1) {\n return;\n }\n\n plugins.push(newPlugin);\n this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {\n for (var name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name]);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown hook \\\"\" + name + \"\\\".\") : void 0;\n }\n }\n\n return registry;\n }, {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n });\n };\n\n return PluginsRegistry;\n}();\n\n/**\n * Sheets registry to access all instances in one place.\n */\n\nvar SheetsRegistry =\n/*#__PURE__*/\nfunction () {\n function SheetsRegistry() {\n this.registry = [];\n }\n\n var _proto = SheetsRegistry.prototype;\n\n /**\n * Register a Style Sheet.\n */\n _proto.add = function add(sheet) {\n var registry = this.registry;\n var index = sheet.options.index;\n if (registry.indexOf(sheet) !== -1) return;\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet);\n return;\n } // Find a position.\n\n\n for (var i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet);\n return;\n }\n }\n }\n /**\n * Reset the registry.\n */\n ;\n\n _proto.reset = function reset() {\n this.registry = [];\n }\n /**\n * Remove a Style Sheet.\n */\n ;\n\n _proto.remove = function remove(sheet) {\n var index = this.registry.indexOf(sheet);\n this.registry.splice(index, 1);\n }\n /**\n * Convert all attached sheets to a CSS string.\n */\n ;\n\n _proto.toString = function toString(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n attached = _ref.attached,\n options = _objectWithoutPropertiesLoose(_ref, [\"attached\"]);\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n var css = '';\n\n for (var i = 0; i < this.registry.length; i++) {\n var sheet = this.registry[i];\n\n if (attached != null && sheet.attached !== attached) {\n continue;\n }\n\n if (css) css += linebreak;\n css += sheet.toString(options);\n }\n\n return css;\n };\n\n _createClass(SheetsRegistry, [{\n key: \"index\",\n\n /**\n * Current highest index number.\n */\n get: function get() {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;\n }\n }]);\n\n return SheetsRegistry;\n}();\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\n\nvar sheets = new SheetsRegistry();\n\n/* eslint-disable */\n\n/**\n * Now that `globalThis` is available on most platforms\n * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility)\n * we check for `globalThis` first. `globalThis` is necessary for jss\n * to run in Agoric's secure version of JavaScript (SES). Under SES,\n * `globalThis` exists, but `window`, `self`, and `Function('return\n * this')()` are all undefined for security reasons.\n *\n * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n */\nvar globalThis$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' && window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : Function('return this')();\n\nvar ns = '2f1acc6c3a606b082e5eef5e54414ffb';\nif (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\n\nvar moduleId = globalThis$1[ns]++;\n\nvar maxRules = 1e10;\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\n\nvar createGenerateId = function createGenerateId(options) {\n if (options === void 0) {\n options = {};\n }\n\n var ruleCounter = 0;\n\n var generateId = function generateId(rule, sheet) {\n ruleCounter += 1;\n\n if (ruleCounter > maxRules) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] You might have a memory leak. Rule counter is at \" + ruleCounter + \".\") : void 0;\n }\n\n var jssId = '';\n var prefix = '';\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix;\n }\n\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id);\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return \"\" + (prefix || 'c') + moduleId + jssId + ruleCounter;\n }\n\n return prefix + rule.key + \"-\" + moduleId + (jssId ? \"-\" + jssId : '') + \"-\" + ruleCounter;\n };\n\n return generateId;\n};\n\n/**\n * Cache the value from the first time a function is called.\n */\n\nvar memoize = function memoize(fn) {\n var value;\n return function () {\n if (!value) value = fn();\n return value;\n };\n};\n/**\n * Get a style property value.\n */\n\n\nvar getPropertyValue = function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n};\n/**\n * Set a style property.\n */\n\n\nvar setProperty = function setProperty(cssRule, prop, value) {\n try {\n var cssValue = value;\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value);\n } // Support CSSTOM.\n\n\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue);\n } else {\n var indexOfImportantFlag = cssValue ? cssValue.indexOf('!important') : -1;\n var cssValueWithoutImportantFlag = indexOfImportantFlag > -1 ? cssValue.substr(0, indexOfImportantFlag - 1) : cssValue;\n cssRule.style.setProperty(prop, cssValueWithoutImportantFlag, indexOfImportantFlag > -1 ? 'important' : '');\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false;\n }\n\n return true;\n};\n/**\n * Remove a style property.\n */\n\n\nvar removeProperty = function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule.style.removeProperty(prop);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] DOMException \\\"\" + err.message + \"\\\" was thrown. Tried to remove property \\\"\" + prop + \"\\\".\") : void 0;\n }\n};\n/**\n * Set the selector.\n */\n\n\nvar setSelector = function setSelector(cssRule, selectorText) {\n cssRule.selectorText = selectorText; // Return false if setter was not successful.\n // Currently works in chrome only.\n\n return cssRule.selectorText === selectorText;\n};\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\n\n\nvar getHead = memoize(function () {\n return document.querySelector('head');\n});\n/**\n * Find attached sheet with an index higher than the passed one.\n */\n\nfunction findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find attached sheet with the highest index.\n */\n\n\nfunction findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find a comment with \"jss\" inside.\n */\n\n\nfunction findCommentNode(text) {\n var head = getHead();\n\n for (var i = 0; i < head.childNodes.length; i++) {\n var node = head.childNodes[i];\n\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node;\n }\n }\n\n return null;\n}\n/**\n * Find a node before which we can insert the sheet.\n */\n\n\nfunction findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n };\n } // Otherwise insert after the last attached.\n\n\n sheet = findHighestSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n };\n }\n } // Try to find a comment placeholder if registry is empty.\n\n\n var insertionPoint = options.insertionPoint;\n\n if (insertionPoint && typeof insertionPoint === 'string') {\n var comment = findCommentNode(insertionPoint);\n\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n };\n } // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Insertion point \\\"\" + insertionPoint + \"\\\" not found.\") : void 0;\n }\n\n return false;\n}\n/**\n * Insert style element into the DOM.\n */\n\n\nfunction insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node);\n return;\n } // Works with iframes and any node types.\n\n\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n var insertionPointElement = insertionPoint;\n var parentNode = insertionPointElement.parentNode;\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Insertion point is not in the DOM.') : void 0;\n return;\n }\n\n getHead().appendChild(style);\n}\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\n\n\nvar getNonce = memoize(function () {\n var node = document.querySelector('meta[property=\"csp-nonce\"]');\n return node ? node.getAttribute('content') : null;\n});\n\nvar _insertRule = function insertRule(container, rule, index) {\n try {\n if ('insertRule' in container) {\n container.insertRule(rule, index);\n } // Keyframes rule.\n else if ('appendRule' in container) {\n container.appendRule(rule);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] \" + err.message) : void 0;\n return false;\n }\n\n return container.cssRules[index];\n};\n\nvar getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) {\n var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong\n\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n return maxIndex;\n }\n\n return index;\n};\n\nvar createStyle = function createStyle() {\n var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n\n el.textContent = '\\n';\n return el;\n};\n\nvar DomRenderer =\n/*#__PURE__*/\nfunction () {\n // Will be empty if link: true option is not set, because\n // it is only for use together with insertRule API.\n function DomRenderer(sheet) {\n this.getPropertyValue = getPropertyValue;\n this.setProperty = setProperty;\n this.removeProperty = removeProperty;\n this.setSelector = setSelector;\n this.hasInsertedRules = false;\n this.cssRules = [];\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet);\n this.sheet = sheet;\n\n var _ref = this.sheet ? this.sheet.options : {},\n media = _ref.media,\n meta = _ref.meta,\n element = _ref.element;\n\n this.element = element || createStyle();\n this.element.setAttribute('data-jss', '');\n if (media) this.element.setAttribute('media', media);\n if (meta) this.element.setAttribute('data-meta', meta);\n var nonce = getNonce();\n if (nonce) this.element.setAttribute('nonce', nonce);\n }\n /**\n * Insert style element into render tree.\n */\n\n\n var _proto = DomRenderer.prototype;\n\n _proto.attach = function attach() {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return;\n insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n\n var deployed = Boolean(this.sheet && this.sheet.deployed);\n\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false;\n this.deploy();\n }\n }\n /**\n * Remove style element from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.sheet) return;\n var parentNode = this.element.parentNode;\n if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed.\n // Though IE will keep them and we need a consistent behavior.\n\n if (this.sheet.options.link) {\n this.cssRules = [];\n this.element.textContent = '\\n';\n }\n }\n /**\n * Inject CSS string into element.\n */\n ;\n\n _proto.deploy = function deploy() {\n var sheet = this.sheet;\n if (!sheet) return;\n\n if (sheet.options.link) {\n this.insertRules(sheet.rules);\n return;\n }\n\n this.element.textContent = \"\\n\" + sheet.toString() + \"\\n\";\n }\n /**\n * Insert RuleList into an element.\n */\n ;\n\n _proto.insertRules = function insertRules(rules, nativeParent) {\n for (var i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent);\n }\n }\n /**\n * Insert a rule into element.\n */\n ;\n\n _proto.insertRule = function insertRule(rule, index, nativeParent) {\n if (nativeParent === void 0) {\n nativeParent = this.element.sheet;\n }\n\n if (rule.rules) {\n var parent = rule;\n var latestNativeParent = nativeParent;\n\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first.\n\n\n latestNativeParent = _insertRule(nativeParent, parent.toString({\n children: false\n }), _insertionIndex);\n\n if (latestNativeParent === false) {\n return false;\n }\n\n this.refCssRule(rule, _insertionIndex, latestNativeParent);\n }\n\n this.insertRules(parent.rules, latestNativeParent);\n return latestNativeParent;\n }\n\n var ruleStr = rule.toString();\n if (!ruleStr) return false;\n var insertionIndex = getValidRuleInsertionIndex(nativeParent, index);\n\n var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex);\n\n if (nativeRule === false) {\n return false;\n }\n\n this.hasInsertedRules = true;\n this.refCssRule(rule, insertionIndex, nativeRule);\n return nativeRule;\n };\n\n _proto.refCssRule = function refCssRule(rule, index, cssRule) {\n rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules\n // like rules inside media queries or keyframes\n\n if (rule.options.parent instanceof StyleSheet) {\n this.cssRules.splice(index, 0, cssRule);\n }\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.deleteRule = function deleteRule(cssRule) {\n var sheet = this.element.sheet;\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return true;\n }\n /**\n * Get index of a CSS Rule.\n */\n ;\n\n _proto.indexOf = function indexOf(cssRule) {\n return this.cssRules.indexOf(cssRule);\n }\n /**\n * Generate a new CSS rule and replace the existing one.\n */\n ;\n\n _proto.replaceRule = function replaceRule(cssRule, rule) {\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n this.element.sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return this.insertRule(rule, index);\n }\n /**\n * Get all rules elements.\n */\n ;\n\n _proto.getRules = function getRules() {\n return this.element.sheet.cssRules;\n };\n\n return DomRenderer;\n}();\n\nvar instanceCounter = 0;\n\nvar Jss =\n/*#__PURE__*/\nfunction () {\n function Jss(options) {\n this.id = instanceCounter++;\n this.version = \"10.9.2\";\n this.plugins = new PluginsRegistry();\n this.options = {\n id: {\n minify: false\n },\n createGenerateId: createGenerateId,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n };\n this.generateId = createGenerateId({\n minify: false\n });\n\n for (var i = 0; i < plugins.length; i++) {\n this.plugins.use(plugins[i], {\n queue: 'internal'\n });\n }\n\n this.setup(options);\n }\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n\n\n var _proto = Jss.prototype;\n\n _proto.setup = function setup(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId;\n }\n\n if (options.id) {\n this.options.id = _extends({}, this.options.id, options.id);\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id);\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;\n\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer;\n } // eslint-disable-next-line prefer-spread\n\n\n if (options.plugins) this.use.apply(this, options.plugins);\n return this;\n }\n /**\n * Create a Style Sheet.\n */\n ;\n\n _proto.createStyleSheet = function createStyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n index = _options.index;\n\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1;\n }\n\n var sheet = new StyleSheet(styles, _extends({}, options, {\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index: index\n }));\n this.plugins.onProcessSheet(sheet);\n return sheet;\n }\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n ;\n\n _proto.removeStyleSheet = function removeStyleSheet(sheet) {\n sheet.detach();\n sheets.remove(sheet);\n return this;\n }\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n ;\n\n _proto.createRule = function createRule$1(name, style, options) {\n if (style === void 0) {\n style = {};\n }\n\n if (options === void 0) {\n options = {};\n }\n\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n return this.createRule(undefined, name, style);\n }\n\n var ruleOptions = _extends({}, options, {\n name: name,\n jss: this,\n Renderer: this.options.Renderer\n });\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;\n if (!ruleOptions.classes) ruleOptions.classes = {};\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {};\n\n var rule = createRule(name, style, ruleOptions);\n\n if (rule) this.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n ;\n\n _proto.use = function use() {\n var _this = this;\n\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n _this.plugins.use(plugin);\n });\n return this;\n };\n\n return Jss;\n}();\n\nvar createJss = function createJss(options) {\n return new Jss(options);\n};\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n * Used in react-jss.\n */\n\nvar SheetsManager =\n/*#__PURE__*/\nfunction () {\n function SheetsManager() {\n this.length = 0;\n this.sheets = new WeakMap();\n }\n\n var _proto = SheetsManager.prototype;\n\n _proto.get = function get(key) {\n var entry = this.sheets.get(key);\n return entry && entry.sheet;\n };\n\n _proto.add = function add(key, sheet) {\n if (this.sheets.has(key)) return;\n this.length++;\n this.sheets.set(key, {\n sheet: sheet,\n refs: 0\n });\n };\n\n _proto.manage = function manage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach();\n }\n\n entry.refs++;\n return entry.sheet;\n }\n\n warning(false, \"[JSS] SheetsManager: can't find sheet to manage\");\n return undefined;\n };\n\n _proto.unmanage = function unmanage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--;\n if (entry.refs === 0) entry.sheet.detach();\n }\n } else {\n warning(false, \"SheetsManager: can't find sheet to unmanage\");\n }\n };\n\n _createClass(SheetsManager, [{\n key: \"size\",\n get: function get() {\n return this.length;\n }\n }]);\n\n return SheetsManager;\n}();\n\n/**\n* Export a constant indicating if this browser has CSSTOM support.\n* https://developers.google.com/web/updates/2018/03/cssom\n*/\nvar hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS;\n\n/**\n * Extracts a styles object with only props that contain function values.\n */\nfunction getDynamicStyles(styles) {\n var to = null;\n\n for (var key in styles) {\n var value = styles[key];\n var type = typeof value;\n\n if (type === 'function') {\n if (!to) to = {};\n to[key] = value;\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n var extracted = getDynamicStyles(value);\n\n if (extracted) {\n if (!to) to = {};\n to[key] = extracted;\n }\n }\n }\n\n return to;\n}\n\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\nvar index = createJss();\n\nexport default index;\nexport { RuleList, SheetsManager, SheetsRegistry, createJss as create, createGenerateId, createRule, getDynamicStyles, hasCSSTOMSupport, sheets, toCssValue };\n","\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

    ' + func(text) + '

    ';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

    fred, barney, & pebbles

    '\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '