H5PIntegration = {
  ajax: { setFinished: "", contentUserData: "" },
  ajaxPath: "/h5p/ajax?action=",
  contents: {
    "cid-3520347065": {
      displayOptions: {
        copy: false,
        copyright: false,
        embed: false,
        export: false,
        frame: false,
        icon: false,
      },
      fullScreen: "0",
      jsonContent:
        '{"scoreShow":"Έλεγχος","submit":"Submit","tryAgain":"Επανάληψη","scoreExplanation":"Για κάθε σωστή απάντηση κερδίζεις έναν βαθμό. Για κάθε λάθος απάντηση χάνεις έναν βαθμό. Η χαμηλότερη δυνατή βαθμολογία είναι 0.","question":{"settings":{"size":{"width":720,"height":410}},"task":{"elements":[{"x":17.073170731707318,"y":0,"width":7.3125,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-H5Cllw9t.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":301,"height":120}},"subContentId":"87b9674a-3c12-4bf0-815a-aaf76bcef2e5","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":17.073170731707318,"y":34.146341463414636,"width":7.3125,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-ZgKPDbvG.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":312,"height":148}},"subContentId":"96278bb4-ae8d-4ba3-803a-ec9f14348614","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":68.29268292682927,"y":34.146341463414636,"width":7.3125,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-DvdYntOJ.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":304,"height":152}},"subContentId":"9dc621f1-d56e-4df3-88a5-f7bb6a5d1507","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":68.29268292682927,"y":0,"width":7.312531059265137,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-WJnRGSEn.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":236,"height":176}},"subContentId":"5ec6873c-3caf-4cdf-b9db-b42679c1183c","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":51.21951219512196,"y":0,"width":7.3125,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-jL77HyZV.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":320,"height":131}},"subContentId":"680a9347-df01-4a43-8b02-cafd494e2db1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":34.146341463414636,"y":34.146341463414636,"width":7.312530868530274,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-SWyvpCAc.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":266,"height":161}},"subContentId":"1ec319cc-82b3-4761-b6c8-940a995a6ded","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":51.21951219512196,"y":34.146341463414636,"width":7.3124994277954105,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-Pam7mSNt.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":295,"height":163}},"subContentId":"91723f62-53bd-4631-8199-f0e658add9ce","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":34.146341463414636,"y":0,"width":7.312531059265137,"height":4.0625,"dropZones":[],"type":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-eF7OhA3e.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":500,"height":333}},"subContentId":"a8fed8f2-3071-44c7-9caf-505acfa3eeac","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"}},"backgroundOpacity":100,"multiple":false},{"x":51.21951219512196,"y":68.29268292682927,"width":6.5,"height":2.6375,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#2f5496\\">Γυμναστήριο</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"14d257a5-470d-480c-9ad9-d375bf35667e","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":68.29268292682927,"y":85.3658536585366,"width":6.512531059265137,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#c00000\\">Εργαστήριο φυσικής</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"28781dad-efe1-4cee-96f9-3c786f6e1ec4","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":17.073170731707318,"y":68.29268292682927,"width":6.512531059265137,"height":2.6375,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#7030a0\\">Βιβλιοθήκη</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"6bb8d27e-8053-4de1-9d67-aeec62038fa1","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":17.073170731707318,"y":85.3658536585366,"width":6.5,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#7030a0\\">Αίθουσα εικαστικών</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"4c8b632f-b589-4179-96c9-4c1ac965aad1","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":34.146341463414636,"y":68.29268292682927,"width":6.5,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#2f5496\\">Τραπεζαρία φαγητού</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"ff272769-8841-4a77-9025-6ea10fe5d497","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":34.146341463414636,"y":85.3658536585366,"width":6.512531059265137,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#538135\\">Γραφείο δασκάλων</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"02eb47ff-ebba-434a-b85c-c1232ff9f168","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":68.29268292682927,"y":68.29268292682927,"width":6.5,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#538135\\">Αίθουσα διδασκαλίας</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"3853f9b7-ca26-4c68-9ecb-4c292cb547a4","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":51.21951219512196,"y":85.3658536585366,"width":6.512531059265137,"height":2.625,"dropZones":["0","1","2","3","4","5","6","7"],"type":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p style=\\"text-align:center\\"><strong><span><span><span><span><span><span><span style=\\"color:#c00000\\">Προαύλιο σχολείου</span></span></span></span></span></span></span></strong></p>\\n"},"subContentId":"c060caeb-e472-4cbc-ae59-e29cab2a055b","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false}],"dropZones":[{"x":17.073170731707318,"y":14.634146341463415,"width":7.3125,"height":3.4375,"correctElements":["8"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>1</div>\\n"},{"x":51.21951219512196,"y":14.634146341463415,"width":7.3125,"height":3.4375,"correctElements":["12"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>3</div>\\n"},{"x":34.146341463414636,"y":14.634146341463415,"width":7.3125,"height":3.4375,"correctElements":["9"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>2</div>\\n"},{"x":68.29268292682927,"y":14.634146341463415,"width":7.3125,"height":3.4375,"correctElements":["13"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>4</div>\\n"},{"x":17.073170731707318,"y":48.78048780487805,"width":7.3125,"height":3.4375,"correctElements":["10"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>5</div>\\n"},{"x":68.29268292682927,"y":48.78048780487805,"width":7.3125,"height":3.4375,"correctElements":["11"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>8</div>\\n"},{"x":51.21951219512196,"y":48.78048780487805,"width":7.3125,"height":3.4375,"correctElements":["15"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>7</div>\\n"},{"x":34.146341463414636,"y":48.78048780487805,"width":7.3125,"height":3.4375,"correctElements":["14"],"showLabel":false,"backgroundOpacity":100,"tipsAndFeedback":{"tip":""},"single":true,"autoAlign":true,"type":{"library":"H5P.DragQuestionDropzone 0.1"},"label":"<div>6</div>\\n"}]}},"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableCheckButton":true,"singlePoint":false,"applyPenalties":false,"enableScoreExplanation":false,"dropZoneHighlighting":"dragging","autoAlignSpacing":0,"enableFullScreen":false,"showScorePoints":true,"showTitle":false},"grabbablePrefix":"Συρόμενο στοιχείο {num} από {total}.","grabbableSuffix":"Έχει τοποθετηθεί στην περιοχή απόθεσης {num}.","dropzonePrefix":"Περιοχή απόθεσης {num} από {total}.","noDropzone":"Μη επιλεγμένη περιοχή απόθεσης.","tipLabel":"Επεξήγηση","tipAvailable":"Επεξήγηση διαθέσιμη","correctAnswer":"Σωστή απάντηση","wrongAnswer":"Λάθος απάντηση","feedbackHeader":"Ανατροφοδότηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","scoreExplanationButtonLabel":"Εμφάνιση επεξήγησης βαθμολογίας","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή.","localize":{"fullscreen":"Πλήρης οθόνη","exitFullscreen":"Έξοδος από την πλήρη οθόνη"}}',
      library: "H5P.DragQuestion 1.14",
      metadata: {
        license: "U",
        title: "Αντιστοιχίζω λέξεις",
        defaultLanguage: "en",
      },
      scripts: [
        "/h5p/libraries/H5P.Image-1.1/image.js?version=1.1.22",
        "/h5p/libraries/H5P.AdvancedText-1.1/text.js?version=1.1.14",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?version=1.10.22",
        "/h5p/libraries/H5P.Transition-1.0/transition.js?version=1.0.4",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-help-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-message-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progress-circle.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-simple-rounded-button.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-speech-bubble.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-throbber.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-tip.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-slider.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-score-bar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progressbar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-ui.js?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/scripts/question.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/explainer.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/score-points.js?version=1.5.15",
        "/h5p/libraries/H5P.DragQuestion-1.14/h5p-drag-question.js?version=1.14.20",
      ],
      styles: [
        "/h5p/libraries/H5P.Image-1.1/image.css?version=1.1.22",
        "/h5p/libraries/H5P.AdvancedText-1.1/text.css?version=1.1.14",
        "/h5p/libraries/FontAwesome-4.5/h5p-font-awesome.min.css?version=4.5.4",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.css?version=1.10.22",
        "/h5p/libraries/H5P.FontIcons-1.0/styles/h5p-font-icons.css?version=1.0.6",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-help-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-message-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progress-circle.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-simple-rounded-button.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-speech-bubble.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-tip.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-slider.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-score-bar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progressbar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-ui.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-icon.css?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/styles/question.css?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/styles/explainer.css?version=1.5.15",
        "/h5p/libraries/H5P.DragQuestion-1.14/css/dragquestion.css?version=1.14.20",
      ],
      url: "3520347065",
      exportUrl: "/h5p/download/3520347065",
    },
  },
  core: {
    scripts: [
      "/h5p/core/js/jquery.js?version=1.24-master",
      "/h5p/core/js/h5p.js?version=1.24-master",
      "/h5p/core/js/h5p-event-dispatcher.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api-event.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api.js?version=1.24-master",
      "/h5p/core/js/h5p-content-type.js?version=1.24-master",
      "/h5p/core/js/h5p-confirmation-dialog.js?version=1.24-master",
      "/h5p/core/js/h5p-action-bar.js?version=1.24-master",
      "/h5p/core/js/request-queue.js?version=1.24-master",
    ],
    styles: [
      "/h5p/core/styles/h5p.css?version=1.24-master",
      "/h5p/core/styles/h5p-confirmation-dialog.css?version=1.24-master",
      "/h5p/core/styles/h5p-core-button.css?version=1.24-master",
    ],
  },
  l10n: {
    H5P: {
      fullscreen: "Fullscreen",
      disableFullscreen: "Disable fullscreen",
      download: "Download",
      copyrights: "Rights of use",
      embed: "Embed",
      size: "Size",
      showAdvanced: "Show advanced",
      hideAdvanced: "Hide advanced",
      advancedHelp:
        "Include this script on your website if you want dynamic sizing of the embedded content:",
      copyrightInformation: "Rights of use",
      close: "Close",
      title: "Title",
      author: "Author",
      year: "Year",
      source: "Source",
      license: "License",
      thumbnail: "Thumbnail",
      noCopyrights: "No copyright information available for this content.",
      reuse: "Reuse",
      reuseContent: "Reuse Content",
      reuseDescription: "Reuse this content.",
      downloadDescription: "Download this content as a H5P file.",
      copyrightsDescription: "View copyright information for this content.",
      embedDescription: "View the embed code for this content.",
      h5pDescription: "Visit H5P.org to check out more cool content.",
      contentChanged: "This content has changed since you last used it.",
      startingOver: "You'll be starting over.",
      by: "by",
      showMore: "Show more",
      showLess: "Show less",
      subLevel: "Sublevel",
      confirmDialogHeader: "Confirm action",
      confirmDialogBody:
        "Please confirm that you wish to proceed. This action is not reversible.",
      cancelLabel: "Cancel",
      confirmLabel: "Confirm",
      licenseU: "Undisclosed",
      licenseCCBY: "Attribution",
      licenseCCBYSA: "Attribution-ShareAlike",
      licenseCCBYND: "Attribution-NoDerivs",
      licenseCCBYNC: "Attribution-NonCommercial",
      licenseCCBYNCSA: "Attribution-NonCommercial-ShareAlike",
      licenseCCBYNCND: "Attribution-NonCommercial-NoDerivs",
      licenseCC40: "4.0 International",
      licenseCC30: "3.0 Unported",
      licenseCC25: "2.5 Generic",
      licenseCC20: "2.0 Generic",
      licenseCC10: "1.0 Generic",
      licenseGPL: "General Public License",
      licenseV3: "Version 3",
      licenseV2: "Version 2",
      licenseV1: "Version 1",
      licensePD: "Public Domain",
      licenseCC010: "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
      licensePDM: "Public Domain Mark",
      licenseC: "Copyright",
      contentType: "Content Type",
      licenseExtras: "License Extras",
      changes: "Changelog",
      contentCopied: "Content is copied to the clipboard",
      connectionLost:
        "Connection lost. Results will be stored and sent when you regain connection.",
      connectionReestablished: "Connection reestablished.",
      resubmitScores: "Attempting to submit stored results.",
      offlineDialogHeader: "Your connection to the server was lost",
      offlineDialogBody:
        "We were unable to send information about your completion of this task. Please check your internet connection.",
      offlineDialogRetryMessage: "Retrying in :num....",
      offlineDialogRetryButtonLabel: "Retry now",
      offlineSuccessfulSubmit: "Successfully submitted results.",
      mainTitle: "Sharing <strong>:title</strong>",
      editInfoTitle: "Edit info for <strong>:title</strong>",
      cancel: "Cancel",
      back: "Back",
      next: "Next",
      reviewInfo: "Review info",
      share: "Share",
      saveChanges: "Save changes",
      registerOnHub: "Register on the H5P Hub",
      updateRegistrationOnHub: "Save account settings",
      requiredInfo: "Required Info",
      optionalInfo: "Optional Info",
      reviewAndShare: "Review & Share",
      reviewAndSave: "Review & Save",
      shared: "Shared",
      currentStep: "Step :step of :total",
      sharingNote: "All content details can be edited after sharing",
      licenseDescription: "Select a license for your content",
      licenseVersion: "License Version",
      licenseVersionDescription: "Select a license version",
      disciplineLabel: "Disciplines",
      disciplineDescription: "You can select multiple disciplines",
      disciplineLimitReachedMessage:
        "You can select up to :numDisciplines disciplines",
      discipline: {
        searchPlaceholder: "Type to search for disciplines",
        in: "in",
        dropdownButton: "Dropdown button",
      },
      removeChip: "Remove :chip from the list",
      keywordsPlaceholder: "Add keywords",
      keywords: "Keywords",
      keywordsDescription:
        'You can add multiple keywords separated by commas. Press "Enter" or "Add" to confirm keywords',
      altText: "Alt text",
      reviewMessage: "Please review the info below before you share",
      subContentWarning:
        "Sub-content (images, questions etc.) will be shared under :license unless otherwise specified in the authoring tool",
      disciplines: "Disciplines",
      shortDescription: "Short description",
      longDescription: "Long description",
      icon: "Icon",
      screenshots: "Screenshots",
      helpChoosingLicense: "Help me choose a license",
      shareFailed: "Share failed.",
      editingFailed: "Editing failed.",
      shareTryAgain: "Something went wrong, please try to share again.",
      pleaseWait: "Please wait...",
      language: "Language",
      level: "Level",
      shortDescriptionPlaceholder: "Short description of your content",
      longDescriptionPlaceholder: "Long description of your content",
      description: "Description",
      iconDescription:
        "640x480px. If not selected content will use category icon",
      screenshotsDescription: "Add up to five screenshots of your content",
      submitted: "Submitted!",
      isNowSubmitted: "Is now submitted to H5P Hub",
      changeHasBeenSubmitted: "A change has been submited for",
      contentAvailable:
        "Your content will normally be available in the Hub within one business day.",
      contentUpdateSoon: "Your content will update soon",
      contentLicenseTitle: "Content License Info",
      licenseDialogDescription:
        "Click on a specific license to get info about proper usage",
      publisherFieldTitle: "Publisher",
      publisherFieldDescription:
        'This will display as the "Publisher name" on shared content',
      emailAddress: "Email Address",
      publisherDescription: "Publisher description",
      publisherDescriptionText:
        'This will be displayed under "Publisher info" on shared content',
      contactPerson: "Contact Person",
      phone: "Phone",
      address: "Address",
      city: "City",
      zip: "Zip",
      country: "Country",
      logoUploadText: "Organization logo or avatar",
      acceptTerms:
        "I accept the <a href=':url' target='_blank'>terms of use</a>",
      successfullyRegistred:
        "You have successfully registered an account on the H5P Hub",
      successfullyRegistredDescription: "You account details can be changed",
      successfullyUpdated:
        "Your H5P Hub account settings have successfully been changed",
      accountDetailsLinkText: "here",
      registrationTitle: "H5P Hub Registration",
      registrationFailed: "An error occurred",
      registrationFailedDescription:
        "We were not able to create an account at this point. Something went wrong. Try again later.",
      maxLength: ":length is the maximum number of characters",
      keywordExists: "Keyword already exists!",
      licenseDetails: "License details",
      remove: "Remove",
      removeImage: "Remove image",
      cancelPublishConfirmationDialogTitle: "Cancel sharing",
      cancelPublishConfirmationDialogDescription:
        "Are you sure you want to cancel the sharing process?",
      cancelPublishConfirmationDialogCancelButtonText: "No",
      cancelPublishConfirmationDialogConfirmButtonText: "Yes",
      add: "Add",
      age: "Typical age",
      ageDescription:
        'The target audience of this content. Possible input formats separated by commas: "1,34-45,-50,59-".',
      invalidAge:
        'Invalid input format for Typical age. Possible input formats separated by commas: "1, 34-45, -50, -59-".',
      contactPersonDescription:
        'H5P will reach out to the contact person in case there are any issues with the content shared by the publisher. The contact person"s name or other information will not be published or shared with third parties',
      emailAddressDescription:
        "The email address will be used by H5P to reach out to the publisher in case of any issues with the content or in case the publisher needs to recover their account. It will not be published or shared with any third parties",
      copyrightWarning:
        "Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.",
      keywordsExits: "Keywords already exists!",
      someKeywordsExits: "Some of these keywords already exist",
    },
  },
  postUserStatistics: false,
  saveFreq: false,
  url: ".",
  hubIsEnabled: true,
  fullscreenDisabled: 0,
  user: { name: "Firstname Surname", id: "1" },
  baseUrl: ".",
  libraryUrl: "",
};

if (new URLSearchParams(window.location.search).get("embed") == "true") {
  H5PIntegration.contents["cid-" + "3520347065"].displayOptions.embed = false;
} else {
  H5PIntegration.contents["cid-" + "3520347065"].embedCode =
    '<iframe src="' +
    window.location.protocol +
    "//" +
    window.location.host +
    window.location.pathname +
    "?embed=true" +
    '" width=":w" height=":h" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
  H5PIntegration.contents["cid-" + "3520347065"].resizeCode = "";
}

/*!@license js/jquery.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/
!(function (e, t) {
  "use strict";
  "object" == typeof module && "object" == typeof module.exports
    ? (module.exports = e.document
        ? t(e, !0)
        : function (e) {
            if (!e.document)
              throw new Error("jQuery requires a window with a document");
            return t(e);
          })
    : t(e);
})("undefined" != typeof window ? window : this, function (x, e) {
  "use strict";
  function g(e) {
    return "function" == typeof e && "number" != typeof e.nodeType;
  }
  function m(e) {
    return null != e && e === e.window;
  }
  var t = [],
    i = Object.getPrototypeOf,
    a = t.slice,
    v = t.flat
      ? function (e) {
          return t.flat.call(e);
        }
      : function (e) {
          return t.concat.apply([], e);
        },
    l = t.push,
    s = t.indexOf,
    n = {},
    o = n.toString,
    b = n.hasOwnProperty,
    r = b.toString,
    h = r.call(Object),
    y = {},
    P = x.document,
    c = { type: !0, src: !0, nonce: !0, noModule: !0 };
  function _(e, t, i) {
    var n,
      s,
      o = (i = i || P).createElement("script");
    if (((o.text = e), t))
      for (n in c)
        (s = t[n] || (t.getAttribute && t.getAttribute(n))) &&
          o.setAttribute(n, s);
    i.head.appendChild(o).parentNode.removeChild(o);
  }
  function f(e) {
    return null == e
      ? e + ""
      : "object" == typeof e || "function" == typeof e
        ? n[o.call(e)] || "object"
        : typeof e;
  }
  var u = "3.5.1",
    C = function (e, t) {
      return new C.fn.init(e, t);
    };
  function d(e) {
    var t = !!e && "length" in e && e.length,
      i = f(e);
    return (
      !g(e) &&
      !m(e) &&
      ("array" === i ||
        0 === t ||
        ("number" == typeof t && 0 < t && t - 1 in e))
    );
  }
  ((C.fn = C.prototype =
    {
      jquery: u,
      constructor: C,
      length: 0,
      toArray: function () {
        return a.call(this);
      },
      get: function (e) {
        return null == e
          ? a.call(this)
          : e < 0
            ? this[e + this.length]
            : this[e];
      },
      pushStack: function (e) {
        e = C.merge(this.constructor(), e);
        return ((e.prevObject = this), e);
      },
      each: function (e) {
        return C.each(this, e);
      },
      map: function (i) {
        return this.pushStack(
          C.map(this, function (e, t) {
            return i.call(e, t, e);
          }),
        );
      },
      slice: function () {
        return this.pushStack(a.apply(this, arguments));
      },
      first: function () {
        return this.eq(0);
      },
      last: function () {
        return this.eq(-1);
      },
      even: function () {
        return this.pushStack(
          C.grep(this, function (e, t) {
            return (t + 1) % 2;
          }),
        );
      },
      odd: function () {
        return this.pushStack(
          C.grep(this, function (e, t) {
            return t % 2;
          }),
        );
      },
      eq: function (e) {
        var t = this.length,
          e = +e + (e < 0 ? t : 0);
        return this.pushStack(0 <= e && e < t ? [this[e]] : []);
      },
      end: function () {
        return this.prevObject || this.constructor();
      },
      push: l,
      sort: t.sort,
      splice: t.splice,
    }),
    (C.extend = C.fn.extend =
      function () {
        var e,
          t,
          i,
          n,
          s,
          o = arguments[0] || {},
          r = 1,
          a = arguments.length,
          l = !1;
        for (
          "boolean" == typeof o && ((l = o), (o = arguments[r] || {}), r++),
            "object" == typeof o || g(o) || (o = {}),
            r === a && ((o = this), r--);
          r < a;
          r++
        )
          if (null != (e = arguments[r]))
            for (t in e)
              ((i = e[t]),
                "__proto__" !== t &&
                  o !== i &&
                  (l && i && (C.isPlainObject(i) || (n = Array.isArray(i)))
                    ? ((s = o[t]),
                      (s =
                        n && !Array.isArray(s)
                          ? []
                          : n || C.isPlainObject(s)
                            ? s
                            : {}),
                      (n = !1),
                      (o[t] = C.extend(l, s, i)))
                    : void 0 !== i && (o[t] = i)));
        return o;
      }),
    C.extend({
      expando: "jQuery" + (u + Math.random()).replace(/\D/g, ""),
      isReady: !0,
      error: function (e) {
        throw new Error(e);
      },
      noop: function () {},
      isPlainObject: function (e) {
        return !(
          !e ||
          "[object Object]" !== o.call(e) ||
          ((e = i(e)) &&
            ("function" !=
              typeof (e = b.call(e, "constructor") && e.constructor) ||
              r.call(e) !== h))
        );
      },
      isEmptyObject: function (e) {
        for (var t in e) return !1;
        return !0;
      },
      globalEval: function (e, t, i) {
        _(e, { nonce: t && t.nonce }, i);
      },
      each: function (e, t) {
        var i,
          n = 0;
        if (d(e))
          for (i = e.length; n < i && !1 !== t.call(e[n], n, e[n]); n++);
        else for (n in e) if (!1 === t.call(e[n], n, e[n])) break;
        return e;
      },
      makeArray: function (e, t) {
        t = t || [];
        return (
          null != e &&
            (d(Object(e))
              ? C.merge(t, "string" == typeof e ? [e] : e)
              : l.call(t, e)),
          t
        );
      },
      inArray: function (e, t, i) {
        return null == t ? -1 : s.call(t, e, i);
      },
      merge: function (e, t) {
        for (var i = +t.length, n = 0, s = e.length; n < i; n++) e[s++] = t[n];
        return ((e.length = s), e);
      },
      grep: function (e, t, i) {
        for (var n = [], s = 0, o = e.length, r = !i; s < o; s++)
          !t(e[s], s) != r && n.push(e[s]);
        return n;
      },
      map: function (e, t, i) {
        var n,
          s,
          o = 0,
          r = [];
        if (d(e))
          for (n = e.length; o < n; o++)
            null != (s = t(e[o], o, i)) && r.push(s);
        else for (o in e) null != (s = t(e[o], o, i)) && r.push(s);
        return v(r);
      },
      guid: 1,
      support: y,
    }),
    "function" == typeof Symbol && (C.fn[Symbol.iterator] = t[Symbol.iterator]),
    C.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (e, t) {
        n["[object " + t + "]"] = t.toLowerCase();
      },
    ));
  var p = (function (i) {
    function u(e, t) {
      return (
        (e = "0x" + e.slice(1) - 65536),
        t ||
          (e < 0
            ? String.fromCharCode(65536 + e)
            : String.fromCharCode((e >> 10) | 55296, (1023 & e) | 56320))
      );
    }
    function d(e, t) {
      return t
        ? "\0" === e
          ? "�"
          : e.slice(0, -1) +
            "\\" +
            e.charCodeAt(e.length - 1).toString(16) +
            " "
        : "\\" + e;
    }
    function n() {
      x();
    }
    var e,
      p,
      _,
      o,
      s,
      f,
      g,
      m,
      w,
      l,
      h,
      x,
      P,
      r,
      C,
      v,
      a,
      c,
      b,
      k = "sizzle" + +new Date(),
      y = i.document,
      T = 0,
      H = 0,
      D = le(),
      I = le(),
      S = le(),
      E = le(),
      A = function (e, t) {
        return (e === t && (h = !0), 0);
      },
      M = {}.hasOwnProperty,
      t = [],
      O = t.pop,
      N = t.push,
      L = t.push,
      z = t.slice,
      j = function (e, t) {
        for (var i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
        return -1;
      },
      F =
        "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
      R = "[\\x20\\t\\r\\n\\f]",
      $ =
        "(?:\\\\[\\da-fA-F]{1,6}" +
        R +
        "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
      q =
        "\\[" +
        R +
        "*(" +
        $ +
        ")(?:" +
        R +
        "*([*^$|!~]?=)" +
        R +
        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
        $ +
        "))|)" +
        R +
        "*\\]",
      W =
        ":(" +
        $ +
        ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
        q +
        ")*)|.*)\\)|)",
      B = new RegExp(R + "+", "g"),
      U = new RegExp("^" + R + "+|((?:^|[^\\\\])(?:\\\\.)*)" + R + "+$", "g"),
      V = new RegExp("^" + R + "*," + R + "*"),
      Y = new RegExp("^" + R + "*([>+~]|" + R + ")" + R + "*"),
      Q = new RegExp(R + "|>"),
      Z = new RegExp(W),
      X = new RegExp("^" + $ + "$"),
      K = {
        ID: new RegExp("^#(" + $ + ")"),
        CLASS: new RegExp("^\\.(" + $ + ")"),
        TAG: new RegExp("^(" + $ + "|[*])"),
        ATTR: new RegExp("^" + q),
        PSEUDO: new RegExp("^" + W),
        CHILD: new RegExp(
          "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
            R +
            "*(even|odd|(([+-]|)(\\d*)n|)" +
            R +
            "*(?:([+-]|)" +
            R +
            "*(\\d+)|))" +
            R +
            "*\\)|)",
          "i",
        ),
        bool: new RegExp("^(?:" + F + ")$", "i"),
        needsContext: new RegExp(
          "^" +
            R +
            "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
            R +
            "*((?:-\\d)?\\d*)" +
            R +
            "*\\)|)(?=[^-]|$)",
          "i",
        ),
      },
      G = /HTML$/i,
      J = /^(?:input|select|textarea|button)$/i,
      ee = /^h\d$/i,
      te = /^[^{]+\{\s*\[native \w/,
      ie = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
      ne = /[+~]/,
      se = new RegExp("\\\\[\\da-fA-F]{1,6}" + R + "?|\\\\([^\\r\\n\\f])", "g"),
      oe = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
      re = be(
        function (e) {
          return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase();
        },
        { dir: "parentNode", next: "legend" },
      );
    try {
      (L.apply((t = z.call(y.childNodes)), y.childNodes),
        t[y.childNodes.length].nodeType);
    } catch (e) {
      L = {
        apply: t.length
          ? function (e, t) {
              N.apply(e, z.call(t));
            }
          : function (e, t) {
              for (var i = e.length, n = 0; (e[i++] = t[n++]); );
              e.length = i - 1;
            },
      };
    }
    function ae(e, t, i, n) {
      var s,
        o,
        r,
        a,
        l,
        h,
        c = t && t.ownerDocument,
        u = t ? t.nodeType : 9;
      if (
        ((i = i || []),
        "string" != typeof e || !e || (1 !== u && 9 !== u && 11 !== u))
      )
        return i;
      if (!n && (x(t), (t = t || P), C)) {
        if (11 !== u && (a = ie.exec(e)))
          if ((h = a[1])) {
            if (9 === u) {
              if (!(o = t.getElementById(h))) return i;
              if (o.id === h) return (i.push(o), i);
            } else if (c && (o = c.getElementById(h)) && b(t, o) && o.id === h)
              return (i.push(o), i);
          } else {
            if (a[2]) return (L.apply(i, t.getElementsByTagName(e)), i);
            if (
              (h = a[3]) &&
              p.getElementsByClassName &&
              t.getElementsByClassName
            )
              return (L.apply(i, t.getElementsByClassName(h)), i);
          }
        if (
          p.qsa &&
          !E[e + " "] &&
          (!v || !v.test(e)) &&
          (1 !== u || "object" !== t.nodeName.toLowerCase())
        ) {
          if (((h = e), (c = t), 1 === u && (Q.test(e) || Y.test(e)))) {
            for (
              ((c = (ne.test(e) && ge(t.parentNode)) || t) === t && p.scope) ||
                ((r = t.getAttribute("id"))
                  ? (r = r.replace(oe, d))
                  : t.setAttribute("id", (r = k))),
                s = (l = f(e)).length;
              s--;

            )
              l[s] = (r ? "#" + r : ":scope") + " " + ve(l[s]);
            h = l.join(",");
          }
          try {
            return (L.apply(i, c.querySelectorAll(h)), i);
          } catch (t) {
            E(e, !0);
          } finally {
            r === k && t.removeAttribute("id");
          }
        }
      }
      return m(e.replace(U, "$1"), t, i, n);
    }
    function le() {
      var n = [];
      return function e(t, i) {
        return (
          n.push(t + " ") > _.cacheLength && delete e[n.shift()],
          (e[t + " "] = i)
        );
      };
    }
    function he(e) {
      return ((e[k] = !0), e);
    }
    function ce(e) {
      var t = P.createElement("fieldset");
      try {
        return !!e(t);
      } catch (e) {
        return !1;
      } finally {
        t.parentNode && t.parentNode.removeChild(t);
      }
    }
    function ue(e, t) {
      for (var i = e.split("|"), n = i.length; n--; ) _.attrHandle[i[n]] = t;
    }
    function de(e, t) {
      var i = t && e,
        n =
          i &&
          1 === e.nodeType &&
          1 === t.nodeType &&
          e.sourceIndex - t.sourceIndex;
      if (n) return n;
      if (i) for (; (i = i.nextSibling); ) if (i === t) return -1;
      return e ? 1 : -1;
    }
    function pe(t) {
      return function (e) {
        return "form" in e
          ? e.parentNode && !1 === e.disabled
            ? "label" in e
              ? "label" in e.parentNode
                ? e.parentNode.disabled === t
                : e.disabled === t
              : e.isDisabled === t || (e.isDisabled !== !t && re(e) === t)
            : e.disabled === t
          : "label" in e && e.disabled === t;
      };
    }
    function fe(r) {
      return he(function (o) {
        return (
          (o = +o),
          he(function (e, t) {
            for (var i, n = r([], e.length, o), s = n.length; s--; )
              e[(i = n[s])] && (e[i] = !(t[i] = e[i]));
          })
        );
      });
    }
    function ge(e) {
      return e && void 0 !== e.getElementsByTagName && e;
    }
    for (e in ((p = ae.support = {}),
    (s = ae.isXML =
      function (e) {
        var t = e.namespaceURI,
          e = (e.ownerDocument || e).documentElement;
        return !G.test(t || (e && e.nodeName) || "HTML");
      }),
    (x = ae.setDocument =
      function (e) {
        var t,
          e = e ? e.ownerDocument || e : y;
        return (
          e != P &&
            9 === e.nodeType &&
            e.documentElement &&
            ((r = (P = e).documentElement),
            (C = !s(P)),
            y != P &&
              (t = P.defaultView) &&
              t.top !== t &&
              (t.addEventListener
                ? t.addEventListener("unload", n, !1)
                : t.attachEvent && t.attachEvent("onunload", n)),
            (p.scope = ce(function (e) {
              return (
                r.appendChild(e).appendChild(P.createElement("div")),
                void 0 !== e.querySelectorAll &&
                  !e.querySelectorAll(":scope fieldset div").length
              );
            })),
            (p.attributes = ce(function (e) {
              return ((e.className = "i"), !e.getAttribute("className"));
            })),
            (p.getElementsByTagName = ce(function (e) {
              return (
                e.appendChild(P.createComment("")),
                !e.getElementsByTagName("*").length
              );
            })),
            (p.getElementsByClassName = te.test(P.getElementsByClassName)),
            (p.getById = ce(function (e) {
              return (
                (r.appendChild(e).id = k),
                !P.getElementsByName || !P.getElementsByName(k).length
              );
            })),
            p.getById
              ? ((_.filter.ID = function (e) {
                  var t = e.replace(se, u);
                  return function (e) {
                    return e.getAttribute("id") === t;
                  };
                }),
                (_.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && C) {
                    e = t.getElementById(e);
                    return e ? [e] : [];
                  }
                }))
              : ((_.filter.ID = function (e) {
                  var t = e.replace(se, u);
                  return function (e) {
                    e =
                      void 0 !== e.getAttributeNode && e.getAttributeNode("id");
                    return e && e.value === t;
                  };
                }),
                (_.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && C) {
                    var i,
                      n,
                      s,
                      o = t.getElementById(e);
                    if (o) {
                      if ((i = o.getAttributeNode("id")) && i.value === e)
                        return [o];
                      for (s = t.getElementsByName(e), n = 0; (o = s[n++]); )
                        if ((i = o.getAttributeNode("id")) && i.value === e)
                          return [o];
                    }
                    return [];
                  }
                })),
            (_.find.TAG = p.getElementsByTagName
              ? function (e, t) {
                  return void 0 !== t.getElementsByTagName
                    ? t.getElementsByTagName(e)
                    : p.qsa
                      ? t.querySelectorAll(e)
                      : void 0;
                }
              : function (e, t) {
                  var i,
                    n = [],
                    s = 0,
                    o = t.getElementsByTagName(e);
                  if ("*" !== e) return o;
                  for (; (i = o[s++]); ) 1 === i.nodeType && n.push(i);
                  return n;
                }),
            (_.find.CLASS =
              p.getElementsByClassName &&
              function (e, t) {
                if (void 0 !== t.getElementsByClassName && C)
                  return t.getElementsByClassName(e);
              }),
            (a = []),
            (v = []),
            (p.qsa = te.test(P.querySelectorAll)) &&
              (ce(function (e) {
                var t;
                ((r.appendChild(e).innerHTML =
                  "<a id='" +
                  k +
                  "'></a><select id='" +
                  k +
                  "-\r\\' msallowcapture=''><option selected=''></option></select>"),
                  e.querySelectorAll("[msallowcapture^='']").length &&
                    v.push("[*^$]=" + R + "*(?:''|\"\")"),
                  e.querySelectorAll("[selected]").length ||
                    v.push("\\[" + R + "*(?:value|" + F + ")"),
                  e.querySelectorAll("[id~=" + k + "-]").length || v.push("~="),
                  (t = P.createElement("input")).setAttribute("name", ""),
                  e.appendChild(t),
                  e.querySelectorAll("[name='']").length ||
                    v.push("\\[" + R + "*name" + R + "*=" + R + "*(?:''|\"\")"),
                  e.querySelectorAll(":checked").length || v.push(":checked"),
                  e.querySelectorAll("a#" + k + "+*").length ||
                    v.push(".#.+[+~]"),
                  e.querySelectorAll("\\\f"),
                  v.push("[\\r\\n\\f]"));
              }),
              ce(function (e) {
                e.innerHTML =
                  "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
                var t = P.createElement("input");
                (t.setAttribute("type", "hidden"),
                  e.appendChild(t).setAttribute("name", "D"),
                  e.querySelectorAll("[name=d]").length &&
                    v.push("name" + R + "*[*^$|!~]?="),
                  2 !== e.querySelectorAll(":enabled").length &&
                    v.push(":enabled", ":disabled"),
                  (r.appendChild(e).disabled = !0),
                  2 !== e.querySelectorAll(":disabled").length &&
                    v.push(":enabled", ":disabled"),
                  e.querySelectorAll("*,:x"),
                  v.push(",.*:"));
              })),
            (p.matchesSelector = te.test(
              (c =
                r.matches ||
                r.webkitMatchesSelector ||
                r.mozMatchesSelector ||
                r.oMatchesSelector ||
                r.msMatchesSelector),
            )) &&
              ce(function (e) {
                ((p.disconnectedMatch = c.call(e, "*")),
                  c.call(e, "[s!='']:x"),
                  a.push("!=", W));
              }),
            (v = v.length && new RegExp(v.join("|"))),
            (a = a.length && new RegExp(a.join("|"))),
            (t = te.test(r.compareDocumentPosition)),
            (b =
              t || te.test(r.contains)
                ? function (e, t) {
                    var i = 9 === e.nodeType ? e.documentElement : e,
                      t = t && t.parentNode;
                    return (
                      e === t ||
                      !(
                        !t ||
                        1 !== t.nodeType ||
                        !(i.contains
                          ? i.contains(t)
                          : e.compareDocumentPosition &&
                            16 & e.compareDocumentPosition(t))
                      )
                    );
                  }
                : function (e, t) {
                    if (t) for (; (t = t.parentNode); ) if (t === e) return !0;
                    return !1;
                  }),
            (A = t
              ? function (e, t) {
                  return e === t
                    ? ((h = !0), 0)
                    : (i =
                        !e.compareDocumentPosition -
                        !t.compareDocumentPosition) ||
                        (1 &
                          (i =
                            (e.ownerDocument || e) == (t.ownerDocument || t)
                              ? e.compareDocumentPosition(t)
                              : 1) ||
                        (!p.sortDetached && t.compareDocumentPosition(e) === i)
                          ? e == P || (e.ownerDocument == y && b(y, e))
                            ? -1
                            : t == P || (t.ownerDocument == y && b(y, t))
                              ? 1
                              : l
                                ? j(l, e) - j(l, t)
                                : 0
                          : 4 & i
                            ? -1
                            : 1);
                  var i;
                }
              : function (e, t) {
                  if (e === t) return ((h = !0), 0);
                  var i,
                    n = 0,
                    s = e.parentNode,
                    o = t.parentNode,
                    r = [e],
                    a = [t];
                  if (!s || !o)
                    return e == P
                      ? -1
                      : t == P
                        ? 1
                        : s
                          ? -1
                          : o
                            ? 1
                            : l
                              ? j(l, e) - j(l, t)
                              : 0;
                  if (s === o) return de(e, t);
                  for (i = e; (i = i.parentNode); ) r.unshift(i);
                  for (i = t; (i = i.parentNode); ) a.unshift(i);
                  for (; r[n] === a[n]; ) n++;
                  return n
                    ? de(r[n], a[n])
                    : r[n] == y
                      ? -1
                      : a[n] == y
                        ? 1
                        : 0;
                })),
          P
        );
      }),
    (ae.matches = function (e, t) {
      return ae(e, null, null, t);
    }),
    (ae.matchesSelector = function (e, t) {
      if (
        (x(e),
        p.matchesSelector &&
          C &&
          !E[t + " "] &&
          (!a || !a.test(t)) &&
          (!v || !v.test(t)))
      )
        try {
          var i = c.call(e, t);
          if (
            i ||
            p.disconnectedMatch ||
            (e.document && 11 !== e.document.nodeType)
          )
            return i;
        } catch (e) {
          E(t, !0);
        }
      return 0 < ae(t, P, null, [e]).length;
    }),
    (ae.contains = function (e, t) {
      return ((e.ownerDocument || e) != P && x(e), b(e, t));
    }),
    (ae.attr = function (e, t) {
      (e.ownerDocument || e) != P && x(e);
      var i = _.attrHandle[t.toLowerCase()],
        i = i && M.call(_.attrHandle, t.toLowerCase()) ? i(e, t, !C) : void 0;
      return void 0 !== i
        ? i
        : p.attributes || !C
          ? e.getAttribute(t)
          : (i = e.getAttributeNode(t)) && i.specified
            ? i.value
            : null;
    }),
    (ae.escape = function (e) {
      return (e + "").replace(oe, d);
    }),
    (ae.error = function (e) {
      throw new Error("Syntax error, unrecognized expression: " + e);
    }),
    (ae.uniqueSort = function (e) {
      var t,
        i = [],
        n = 0,
        s = 0;
      if (
        ((h = !p.detectDuplicates),
        (l = !p.sortStable && e.slice(0)),
        e.sort(A),
        h)
      ) {
        for (; (t = e[s++]); ) t === e[s] && (n = i.push(s));
        for (; n--; ) e.splice(i[n], 1);
      }
      return ((l = null), e);
    }),
    (o = ae.getText =
      function (e) {
        var t,
          i = "",
          n = 0,
          s = e.nodeType;
        if (s) {
          if (1 === s || 9 === s || 11 === s) {
            if ("string" == typeof e.textContent) return e.textContent;
            for (e = e.firstChild; e; e = e.nextSibling) i += o(e);
          } else if (3 === s || 4 === s) return e.nodeValue;
        } else for (; (t = e[n++]); ) i += o(t);
        return i;
      }),
    ((_ = ae.selectors =
      {
        cacheLength: 50,
        createPseudo: he,
        match: K,
        attrHandle: {},
        find: {},
        relative: {
          ">": { dir: "parentNode", first: !0 },
          " ": { dir: "parentNode" },
          "+": { dir: "previousSibling", first: !0 },
          "~": { dir: "previousSibling" },
        },
        preFilter: {
          ATTR: function (e) {
            return (
              (e[1] = e[1].replace(se, u)),
              (e[3] = (e[3] || e[4] || e[5] || "").replace(se, u)),
              "~=" === e[2] && (e[3] = " " + e[3] + " "),
              e.slice(0, 4)
            );
          },
          CHILD: function (e) {
            return (
              (e[1] = e[1].toLowerCase()),
              "nth" === e[1].slice(0, 3)
                ? (e[3] || ae.error(e[0]),
                  (e[4] = +(e[4]
                    ? e[5] + (e[6] || 1)
                    : 2 * ("even" === e[3] || "odd" === e[3]))),
                  (e[5] = +(e[7] + e[8] || "odd" === e[3])))
                : e[3] && ae.error(e[0]),
              e
            );
          },
          PSEUDO: function (e) {
            var t,
              i = !e[6] && e[2];
            return K.CHILD.test(e[0])
              ? null
              : (e[3]
                  ? (e[2] = e[4] || e[5] || "")
                  : i &&
                    Z.test(i) &&
                    (t = f(i, !0)) &&
                    (t = i.indexOf(")", i.length - t) - i.length) &&
                    ((e[0] = e[0].slice(0, t)), (e[2] = i.slice(0, t))),
                e.slice(0, 3));
          },
        },
        filter: {
          TAG: function (e) {
            var t = e.replace(se, u).toLowerCase();
            return "*" === e
              ? function () {
                  return !0;
                }
              : function (e) {
                  return e.nodeName && e.nodeName.toLowerCase() === t;
                };
          },
          CLASS: function (e) {
            var t = D[e + " "];
            return (
              t ||
              ((t = new RegExp("(^|" + R + ")" + e + "(" + R + "|$)")) &&
                D(e, function (e) {
                  return t.test(
                    ("string" == typeof e.className && e.className) ||
                      (void 0 !== e.getAttribute && e.getAttribute("class")) ||
                      "",
                  );
                }))
            );
          },
          ATTR: function (t, i, n) {
            return function (e) {
              e = ae.attr(e, t);
              return null == e
                ? "!=" === i
                : !i ||
                    ((e += ""),
                    "=" === i
                      ? e === n
                      : "!=" === i
                        ? e !== n
                        : "^=" === i
                          ? n && 0 === e.indexOf(n)
                          : "*=" === i
                            ? n && -1 < e.indexOf(n)
                            : "$=" === i
                              ? n && e.slice(-n.length) === n
                              : "~=" === i
                                ? -1 <
                                  (" " + e.replace(B, " ") + " ").indexOf(n)
                                : "|=" === i &&
                                  (e === n ||
                                    e.slice(0, n.length + 1) === n + "-"));
            };
          },
          CHILD: function (f, e, t, g, m) {
            var v = "nth" !== f.slice(0, 3),
              b = "last" !== f.slice(-4),
              y = "of-type" === e;
            return 1 === g && 0 === m
              ? function (e) {
                  return !!e.parentNode;
                }
              : function (e, t, i) {
                  var n,
                    s,
                    o,
                    r,
                    a,
                    l,
                    h = v != b ? "nextSibling" : "previousSibling",
                    c = e.parentNode,
                    u = y && e.nodeName.toLowerCase(),
                    d = !i && !y,
                    p = !1;
                  if (c) {
                    if (v) {
                      for (; h; ) {
                        for (r = e; (r = r[h]); )
                          if (
                            y
                              ? r.nodeName.toLowerCase() === u
                              : 1 === r.nodeType
                          )
                            return !1;
                        l = h = "only" === f && !l && "nextSibling";
                      }
                      return !0;
                    }
                    if (((l = [b ? c.firstChild : c.lastChild]), b && d)) {
                      for (
                        p =
                          (a =
                            (n =
                              (s =
                                (o = (r = c)[k] || (r[k] = {}))[r.uniqueID] ||
                                (o[r.uniqueID] = {}))[f] || [])[0] === T &&
                            n[1]) && n[2],
                          r = a && c.childNodes[a];
                        (r = (++a && r && r[h]) || (p = a = 0) || l.pop());

                      )
                        if (1 === r.nodeType && ++p && r === e) {
                          s[f] = [T, a, p];
                          break;
                        }
                    } else if (
                      !1 ===
                      (p = d
                        ? (a =
                            (n =
                              (s =
                                (o = (r = e)[k] || (r[k] = {}))[r.uniqueID] ||
                                (o[r.uniqueID] = {}))[f] || [])[0] === T &&
                            n[1])
                        : p)
                    )
                      for (
                        ;
                        (r = (++a && r && r[h]) || (p = a = 0) || l.pop()) &&
                        ((y
                          ? r.nodeName.toLowerCase() !== u
                          : 1 !== r.nodeType) ||
                          !++p ||
                          (d &&
                            ((s =
                              (o = r[k] || (r[k] = {}))[r.uniqueID] ||
                              (o[r.uniqueID] = {}))[f] = [T, p]),
                          r !== e));

                      );
                    return (p -= m) === g || (p % g == 0 && 0 <= p / g);
                  }
                };
          },
          PSEUDO: function (e, o) {
            var t,
              r =
                _.pseudos[e] ||
                _.setFilters[e.toLowerCase()] ||
                ae.error("unsupported pseudo: " + e);
            return r[k]
              ? r(o)
              : 1 < r.length
                ? ((t = [e, e, "", o]),
                  _.setFilters.hasOwnProperty(e.toLowerCase())
                    ? he(function (e, t) {
                        for (var i, n = r(e, o), s = n.length; s--; )
                          e[(i = j(e, n[s]))] = !(t[i] = n[s]);
                      })
                    : function (e) {
                        return r(e, 0, t);
                      })
                : r;
          },
        },
        pseudos: {
          not: he(function (e) {
            var n = [],
              s = [],
              a = g(e.replace(U, "$1"));
            return a[k]
              ? he(function (e, t, i, n) {
                  for (var s, o = a(e, null, n, []), r = e.length; r--; )
                    (s = o[r]) && (e[r] = !(t[r] = s));
                })
              : function (e, t, i) {
                  return (
                    (n[0] = e),
                    a(n, null, i, s),
                    (n[0] = null),
                    !s.pop()
                  );
                };
          }),
          has: he(function (t) {
            return function (e) {
              return 0 < ae(t, e).length;
            };
          }),
          contains: he(function (t) {
            return (
              (t = t.replace(se, u)),
              function (e) {
                return -1 < (e.textContent || o(e)).indexOf(t);
              }
            );
          }),
          lang: he(function (i) {
            return (
              X.test(i || "") || ae.error("unsupported lang: " + i),
              (i = i.replace(se, u).toLowerCase()),
              function (e) {
                var t;
                do {
                  if (
                    (t = C
                      ? e.lang
                      : e.getAttribute("xml:lang") || e.getAttribute("lang"))
                  )
                    return (
                      (t = t.toLowerCase()) === i || 0 === t.indexOf(i + "-")
                    );
                } while ((e = e.parentNode) && 1 === e.nodeType);
                return !1;
              }
            );
          }),
          target: function (e) {
            var t = i.location && i.location.hash;
            return t && t.slice(1) === e.id;
          },
          root: function (e) {
            return e === r;
          },
          focus: function (e) {
            return (
              e === P.activeElement &&
              (!P.hasFocus || P.hasFocus()) &&
              !!(e.type || e.href || ~e.tabIndex)
            );
          },
          enabled: pe(!1),
          disabled: pe(!0),
          checked: function (e) {
            var t = e.nodeName.toLowerCase();
            return (
              ("input" === t && !!e.checked) || ("option" === t && !!e.selected)
            );
          },
          selected: function (e) {
            return (
              e.parentNode && e.parentNode.selectedIndex,
              !0 === e.selected
            );
          },
          empty: function (e) {
            for (e = e.firstChild; e; e = e.nextSibling)
              if (e.nodeType < 6) return !1;
            return !0;
          },
          parent: function (e) {
            return !_.pseudos.empty(e);
          },
          header: function (e) {
            return ee.test(e.nodeName);
          },
          input: function (e) {
            return J.test(e.nodeName);
          },
          button: function (e) {
            var t = e.nodeName.toLowerCase();
            return ("input" === t && "button" === e.type) || "button" === t;
          },
          text: function (e) {
            return (
              "input" === e.nodeName.toLowerCase() &&
              "text" === e.type &&
              (null == (e = e.getAttribute("type")) ||
                "text" === e.toLowerCase())
            );
          },
          first: fe(function () {
            return [0];
          }),
          last: fe(function (e, t) {
            return [t - 1];
          }),
          eq: fe(function (e, t, i) {
            return [i < 0 ? i + t : i];
          }),
          even: fe(function (e, t) {
            for (var i = 0; i < t; i += 2) e.push(i);
            return e;
          }),
          odd: fe(function (e, t) {
            for (var i = 1; i < t; i += 2) e.push(i);
            return e;
          }),
          lt: fe(function (e, t, i) {
            for (var n = i < 0 ? i + t : t < i ? t : i; 0 <= --n; ) e.push(n);
            return e;
          }),
          gt: fe(function (e, t, i) {
            for (var n = i < 0 ? i + t : i; ++n < t; ) e.push(n);
            return e;
          }),
        },
      }).pseudos.nth = _.pseudos.eq),
    { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }))
      _.pseudos[e] = (function (t) {
        return function (e) {
          return "input" === e.nodeName.toLowerCase() && e.type === t;
        };
      })(e);
    for (e in { submit: !0, reset: !0 })
      _.pseudos[e] = (function (i) {
        return function (e) {
          var t = e.nodeName.toLowerCase();
          return ("input" === t || "button" === t) && e.type === i;
        };
      })(e);
    function me() {}
    function ve(e) {
      for (var t = 0, i = e.length, n = ""; t < i; t++) n += e[t].value;
      return n;
    }
    function be(r, e, t) {
      var a = e.dir,
        l = e.next,
        h = l || a,
        c = t && "parentNode" === h,
        u = H++;
      return e.first
        ? function (e, t, i) {
            for (; (e = e[a]); ) if (1 === e.nodeType || c) return r(e, t, i);
            return !1;
          }
        : function (e, t, i) {
            var n,
              s,
              o = [T, u];
            if (i) {
              for (; (e = e[a]); )
                if ((1 === e.nodeType || c) && r(e, t, i)) return !0;
            } else
              for (; (e = e[a]); )
                if (1 === e.nodeType || c)
                  if (
                    ((n =
                      (s = e[k] || (e[k] = {}))[e.uniqueID] ||
                      (s[e.uniqueID] = {})),
                    l && l === e.nodeName.toLowerCase())
                  )
                    e = e[a] || e;
                  else {
                    if ((s = n[h]) && s[0] === T && s[1] === u)
                      return (o[2] = s[2]);
                    if (((n[h] = o)[2] = r(e, t, i))) return !0;
                  }
            return !1;
          };
    }
    function ye(s) {
      return 1 < s.length
        ? function (e, t, i) {
            for (var n = s.length; n--; ) if (!s[n](e, t, i)) return !1;
            return !0;
          }
        : s[0];
    }
    function _e(e, t, i, n, s) {
      for (var o, r = [], a = 0, l = e.length, h = null != t; a < l; a++)
        (o = e[a]) && ((i && !i(o, n, s)) || (r.push(o), h && t.push(a)));
      return r;
    }
    function we(e) {
      for (
        var n,
          t,
          i,
          s = e.length,
          o = _.relative[e[0].type],
          r = o || _.relative[" "],
          a = o ? 1 : 0,
          l = be(
            function (e) {
              return e === n;
            },
            r,
            !0,
          ),
          h = be(
            function (e) {
              return -1 < j(n, e);
            },
            r,
            !0,
          ),
          c = [
            function (e, t, i) {
              i = (!o && (i || t !== w)) || ((n = t).nodeType ? l : h)(e, t, i);
              return ((n = null), i);
            },
          ];
        a < s;
        a++
      )
        if ((t = _.relative[e[a].type])) c = [be(ye(c), t)];
        else {
          if ((t = _.filter[e[a].type].apply(null, e[a].matches))[k]) {
            for (i = ++a; i < s && !_.relative[e[i].type]; i++);
            return (function e(p, f, g, m, v, t) {
              return (
                m && !m[k] && (m = e(m)),
                v && !v[k] && (v = e(v, t)),
                he(function (e, t, i, n) {
                  var s,
                    o,
                    r,
                    a = [],
                    l = [],
                    h = t.length,
                    c =
                      e ||
                      (function (e, t, i) {
                        for (var n = 0, s = t.length; n < s; n++)
                          ae(e, t[n], i);
                        return i;
                      })(f || "*", i.nodeType ? [i] : i, []),
                    u = !p || (!e && f) ? c : _e(c, a, p, i, n),
                    d = g ? (v || (e ? p : h || m) ? [] : t) : u;
                  if ((g && g(u, d, i, n), m))
                    for (s = _e(d, l), m(s, [], i, n), o = s.length; o--; )
                      (r = s[o]) && (d[l[o]] = !(u[l[o]] = r));
                  if (e) {
                    if (v || p) {
                      if (v) {
                        for (s = [], o = d.length; o--; )
                          (r = d[o]) && s.push((u[o] = r));
                        v(null, (d = []), s, n);
                      }
                      for (o = d.length; o--; )
                        (r = d[o]) &&
                          -1 < (s = v ? j(e, r) : a[o]) &&
                          (e[s] = !(t[s] = r));
                    }
                  } else
                    ((d = _e(d === t ? d.splice(h, d.length) : d)),
                      v ? v(null, t, d, n) : L.apply(t, d));
                })
              );
            })(
              1 < a && ye(c),
              1 < a &&
                ve(
                  e
                    .slice(0, a - 1)
                    .concat({ value: " " === e[a - 2].type ? "*" : "" }),
                ).replace(U, "$1"),
              t,
              a < i && we(e.slice(a, i)),
              i < s && we((e = e.slice(i))),
              i < s && ve(e),
            );
          }
          c.push(t);
        }
      return ye(c);
    }
    return (
      (me.prototype = _.filters = _.pseudos),
      (_.setFilters = new me()),
      (f = ae.tokenize =
        function (e, t) {
          var i,
            n,
            s,
            o,
            r,
            a,
            l,
            h = I[e + " "];
          if (h) return t ? 0 : h.slice(0);
          for (r = e, a = [], l = _.preFilter; r; ) {
            for (o in ((i && !(n = V.exec(r))) ||
              (n && (r = r.slice(n[0].length) || r), a.push((s = []))),
            (i = !1),
            (n = Y.exec(r)) &&
              ((i = n.shift()),
              s.push({ value: i, type: n[0].replace(U, " ") }),
              (r = r.slice(i.length))),
            _.filter))
              !(n = K[o].exec(r)) ||
                (l[o] && !(n = l[o](n))) ||
                ((i = n.shift()),
                s.push({ value: i, type: o, matches: n }),
                (r = r.slice(i.length)));
            if (!i) break;
          }
          return t ? r.length : r ? ae.error(e) : I(e, a).slice(0);
        }),
      (g = ae.compile =
        function (e, t) {
          var i,
            m,
            v,
            b,
            y,
            n,
            s = [],
            o = [],
            r = S[e + " "];
          if (!r) {
            for (i = (t = t || f(e)).length; i--; )
              ((r = we(t[i]))[k] ? s : o).push(r);
            (r = S(
              e,
              ((b = 0 < (v = s).length),
              (y = 0 < (m = o).length),
              (n = function (e, t, i, n, s) {
                var o,
                  r,
                  a,
                  l = 0,
                  h = "0",
                  c = e && [],
                  u = [],
                  d = w,
                  p = e || (y && _.find.TAG("*", s)),
                  f = (T += null == d ? 1 : Math.random() || 0.1),
                  g = p.length;
                for (
                  s && (w = t == P || t || s);
                  h !== g && null != (o = p[h]);
                  h++
                ) {
                  if (y && o) {
                    for (
                      r = 0, t || o.ownerDocument == P || (x(o), (i = !C));
                      (a = m[r++]);

                    )
                      if (a(o, t || P, i)) {
                        n.push(o);
                        break;
                      }
                    s && (T = f);
                  }
                  b && ((o = !a && o) && l--, e && c.push(o));
                }
                if (((l += h), b && h !== l)) {
                  for (r = 0; (a = v[r++]); ) a(c, u, t, i);
                  if (e) {
                    if (0 < l) for (; h--; ) c[h] || u[h] || (u[h] = O.call(n));
                    u = _e(u);
                  }
                  (L.apply(n, u),
                    s &&
                      !e &&
                      0 < u.length &&
                      1 < l + v.length &&
                      ae.uniqueSort(n));
                }
                return (s && ((T = f), (w = d)), c);
              }),
              b ? he(n) : n),
            )).selector = e;
          }
          return r;
        }),
      (m = ae.select =
        function (e, t, i, n) {
          var s,
            o,
            r,
            a,
            l,
            h = "function" == typeof e && e,
            c = !n && f((e = h.selector || e));
          if (((i = i || []), 1 === c.length)) {
            if (
              2 < (o = c[0] = c[0].slice(0)).length &&
              "ID" === (r = o[0]).type &&
              9 === t.nodeType &&
              C &&
              _.relative[o[1].type]
            ) {
              if (!(t = (_.find.ID(r.matches[0].replace(se, u), t) || [])[0]))
                return i;
              (h && (t = t.parentNode), (e = e.slice(o.shift().value.length)));
            }
            for (
              s = K.needsContext.test(e) ? 0 : o.length;
              s-- && ((r = o[s]), !_.relative[(a = r.type)]);

            )
              if (
                (l = _.find[a]) &&
                (n = l(
                  r.matches[0].replace(se, u),
                  (ne.test(o[0].type) && ge(t.parentNode)) || t,
                ))
              ) {
                if ((o.splice(s, 1), !(e = n.length && ve(o))))
                  return (L.apply(i, n), i);
                break;
              }
          }
          return (
            (h || g(e, c))(
              n,
              t,
              !C,
              i,
              !t || (ne.test(e) && ge(t.parentNode)) || t,
            ),
            i
          );
        }),
      (p.sortStable = k.split("").sort(A).join("") === k),
      (p.detectDuplicates = !!h),
      x(),
      (p.sortDetached = ce(function (e) {
        return 1 & e.compareDocumentPosition(P.createElement("fieldset"));
      })),
      ce(function (e) {
        return (
          (e.innerHTML = "<a href='#'></a>"),
          "#" === e.firstChild.getAttribute("href")
        );
      }) ||
        ue("type|href|height|width", function (e, t, i) {
          if (!i) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
        }),
      (p.attributes &&
        ce(function (e) {
          return (
            (e.innerHTML = "<input/>"),
            e.firstChild.setAttribute("value", ""),
            "" === e.firstChild.getAttribute("value")
          );
        })) ||
        ue("value", function (e, t, i) {
          if (!i && "input" === e.nodeName.toLowerCase()) return e.defaultValue;
        }),
      ce(function (e) {
        return null == e.getAttribute("disabled");
      }) ||
        ue(F, function (e, t, i) {
          if (!i)
            return !0 === e[t]
              ? t.toLowerCase()
              : (t = e.getAttributeNode(t)) && t.specified
                ? t.value
                : null;
        }),
      ae
    );
  })(x);
  ((C.find = p),
    (C.expr = p.selectors),
    (C.expr[":"] = C.expr.pseudos),
    (C.uniqueSort = C.unique = p.uniqueSort),
    (C.text = p.getText),
    (C.isXMLDoc = p.isXML),
    (C.contains = p.contains),
    (C.escapeSelector = p.escape));
  function w(e, t, i) {
    for (var n = [], s = void 0 !== i; (e = e[t]) && 9 !== e.nodeType; )
      if (1 === e.nodeType) {
        if (s && C(e).is(i)) break;
        n.push(e);
      }
    return n;
  }
  function k(e, t) {
    for (var i = []; e; e = e.nextSibling)
      1 === e.nodeType && e !== t && i.push(e);
    return i;
  }
  var T = C.expr.match.needsContext;
  function H(e, t) {
    return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
  }
  var D = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  function I(e, i, n) {
    return g(i)
      ? C.grep(e, function (e, t) {
          return !!i.call(e, t, e) !== n;
        })
      : i.nodeType
        ? C.grep(e, function (e) {
            return (e === i) !== n;
          })
        : "string" != typeof i
          ? C.grep(e, function (e) {
              return -1 < s.call(i, e) !== n;
            })
          : C.filter(i, e, n);
  }
  ((C.filter = function (e, t, i) {
    var n = t[0];
    return (
      i && (e = ":not(" + e + ")"),
      1 === t.length && 1 === n.nodeType
        ? C.find.matchesSelector(n, e)
          ? [n]
          : []
        : C.find.matches(
            e,
            C.grep(t, function (e) {
              return 1 === e.nodeType;
            }),
          )
    );
  }),
    C.fn.extend({
      find: function (e) {
        var t,
          i,
          n = this.length,
          s = this;
        if ("string" != typeof e)
          return this.pushStack(
            C(e).filter(function () {
              for (t = 0; t < n; t++) if (C.contains(s[t], this)) return !0;
            }),
          );
        for (i = this.pushStack([]), t = 0; t < n; t++) C.find(e, s[t], i);
        return 1 < n ? C.uniqueSort(i) : i;
      },
      filter: function (e) {
        return this.pushStack(I(this, e || [], !1));
      },
      not: function (e) {
        return this.pushStack(I(this, e || [], !0));
      },
      is: function (e) {
        return !!I(this, "string" == typeof e && T.test(e) ? C(e) : e || [], !1)
          .length;
      },
    }));
  var S = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
  (C.fn.init = function (e, t, i) {
    if (!e) return this;
    if (((i = i || E), "string" != typeof e))
      return e.nodeType
        ? ((this[0] = e), (this.length = 1), this)
        : g(e)
          ? void 0 !== i.ready
            ? i.ready(e)
            : e(C)
          : C.makeArray(e, this);
    if (
      !(n =
        "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length
          ? [null, e, null]
          : S.exec(e)) ||
      (!n[1] && t)
    )
      return (!t || t.jquery ? t || i : this.constructor(t)).find(e);
    if (n[1]) {
      if (
        ((t = t instanceof C ? t[0] : t),
        C.merge(
          this,
          C.parseHTML(n[1], t && t.nodeType ? t.ownerDocument || t : P, !0),
        ),
        D.test(n[1]) && C.isPlainObject(t))
      )
        for (var n in t) g(this[n]) ? this[n](t[n]) : this.attr(n, t[n]);
      return this;
    }
    return (
      (e = P.getElementById(n[2])) && ((this[0] = e), (this.length = 1)),
      this
    );
  }).prototype = C.fn;
  var E = C(P),
    A = /^(?:parents|prev(?:Until|All))/,
    M = { children: !0, contents: !0, next: !0, prev: !0 };
  function O(e, t) {
    for (; (e = e[t]) && 1 !== e.nodeType; );
    return e;
  }
  (C.fn.extend({
    has: function (e) {
      var t = C(e, this),
        i = t.length;
      return this.filter(function () {
        for (var e = 0; e < i; e++) if (C.contains(this, t[e])) return !0;
      });
    },
    closest: function (e, t) {
      var i,
        n = 0,
        s = this.length,
        o = [],
        r = "string" != typeof e && C(e);
      if (!T.test(e))
        for (; n < s; n++)
          for (i = this[n]; i && i !== t; i = i.parentNode)
            if (
              i.nodeType < 11 &&
              (r
                ? -1 < r.index(i)
                : 1 === i.nodeType && C.find.matchesSelector(i, e))
            ) {
              o.push(i);
              break;
            }
      return this.pushStack(1 < o.length ? C.uniqueSort(o) : o);
    },
    index: function (e) {
      return e
        ? "string" == typeof e
          ? s.call(C(e), this[0])
          : s.call(this, e.jquery ? e[0] : e)
        : this[0] && this[0].parentNode
          ? this.first().prevAll().length
          : -1;
    },
    add: function (e, t) {
      return this.pushStack(C.uniqueSort(C.merge(this.get(), C(e, t))));
    },
    addBack: function (e) {
      return this.add(null == e ? this.prevObject : this.prevObject.filter(e));
    },
  }),
    C.each(
      {
        parent: function (e) {
          e = e.parentNode;
          return e && 11 !== e.nodeType ? e : null;
        },
        parents: function (e) {
          return w(e, "parentNode");
        },
        parentsUntil: function (e, t, i) {
          return w(e, "parentNode", i);
        },
        next: function (e) {
          return O(e, "nextSibling");
        },
        prev: function (e) {
          return O(e, "previousSibling");
        },
        nextAll: function (e) {
          return w(e, "nextSibling");
        },
        prevAll: function (e) {
          return w(e, "previousSibling");
        },
        nextUntil: function (e, t, i) {
          return w(e, "nextSibling", i);
        },
        prevUntil: function (e, t, i) {
          return w(e, "previousSibling", i);
        },
        siblings: function (e) {
          return k((e.parentNode || {}).firstChild, e);
        },
        children: function (e) {
          return k(e.firstChild);
        },
        contents: function (e) {
          return null != e.contentDocument && i(e.contentDocument)
            ? e.contentDocument
            : (H(e, "template") && (e = e.content || e),
              C.merge([], e.childNodes));
        },
      },
      function (n, s) {
        C.fn[n] = function (e, t) {
          var i = C.map(this, s, e);
          return (
            (t = "Until" !== n.slice(-5) ? e : t) &&
              "string" == typeof t &&
              (i = C.filter(t, i)),
            1 < this.length &&
              (M[n] || C.uniqueSort(i), A.test(n) && i.reverse()),
            this.pushStack(i)
          );
        };
      },
    ));
  var N = /[^\x20\t\r\n\f]+/g;
  function L(e) {
    return e;
  }
  function z(e) {
    throw e;
  }
  function j(e, t, i, n) {
    var s;
    try {
      e && g((s = e.promise))
        ? s.call(e).done(t).fail(i)
        : e && g((s = e.then))
          ? s.call(e, t, i)
          : t.apply(void 0, [e].slice(n));
    } catch (e) {
      i.apply(void 0, [e]);
    }
  }
  ((C.Callbacks = function (n) {
    var e, i;
    n =
      "string" == typeof n
        ? ((e = n),
          (i = {}),
          C.each(e.match(N) || [], function (e, t) {
            i[t] = !0;
          }),
          i)
        : C.extend({}, n);
    function s() {
      for (a = a || n.once, r = o = !0; h.length; c = -1)
        for (t = h.shift(); ++c < l.length; )
          !1 === l[c].apply(t[0], t[1]) &&
            n.stopOnFalse &&
            ((c = l.length), (t = !1));
      (n.memory || (t = !1), (o = !1), a && (l = t ? [] : ""));
    }
    var o,
      t,
      r,
      a,
      l = [],
      h = [],
      c = -1,
      u = {
        add: function () {
          return (
            l &&
              (t && !o && ((c = l.length - 1), h.push(t)),
              (function i(e) {
                C.each(e, function (e, t) {
                  g(t)
                    ? (n.unique && u.has(t)) || l.push(t)
                    : t && t.length && "string" !== f(t) && i(t);
                });
              })(arguments),
              t && !o && s()),
            this
          );
        },
        remove: function () {
          return (
            C.each(arguments, function (e, t) {
              for (var i; -1 < (i = C.inArray(t, l, i)); )
                (l.splice(i, 1), i <= c && c--);
            }),
            this
          );
        },
        has: function (e) {
          return e ? -1 < C.inArray(e, l) : 0 < l.length;
        },
        empty: function () {
          return ((l = l && []), this);
        },
        disable: function () {
          return ((a = h = []), (l = t = ""), this);
        },
        disabled: function () {
          return !l;
        },
        lock: function () {
          return ((a = h = []), t || o || (l = t = ""), this);
        },
        locked: function () {
          return !!a;
        },
        fireWith: function (e, t) {
          return (
            a ||
              ((t = [e, (t = t || []).slice ? t.slice() : t]),
              h.push(t),
              o || s()),
            this
          );
        },
        fire: function () {
          return (u.fireWith(this, arguments), this);
        },
        fired: function () {
          return !!r;
        },
      };
    return u;
  }),
    C.extend({
      Deferred: function (e) {
        var o = [
            [
              "notify",
              "progress",
              C.Callbacks("memory"),
              C.Callbacks("memory"),
              2,
            ],
            [
              "resolve",
              "done",
              C.Callbacks("once memory"),
              C.Callbacks("once memory"),
              0,
              "resolved",
            ],
            [
              "reject",
              "fail",
              C.Callbacks("once memory"),
              C.Callbacks("once memory"),
              1,
              "rejected",
            ],
          ],
          s = "pending",
          r = {
            state: function () {
              return s;
            },
            always: function () {
              return (a.done(arguments).fail(arguments), this);
            },
            catch: function (e) {
              return r.then(null, e);
            },
            pipe: function () {
              var s = arguments;
              return C.Deferred(function (n) {
                (C.each(o, function (e, t) {
                  var i = g(s[t[4]]) && s[t[4]];
                  a[t[1]](function () {
                    var e = i && i.apply(this, arguments);
                    e && g(e.promise)
                      ? e
                          .promise()
                          .progress(n.notify)
                          .done(n.resolve)
                          .fail(n.reject)
                      : n[t[0] + "With"](this, i ? [e] : arguments);
                  });
                }),
                  (s = null));
              }).promise();
            },
            then: function (t, i, n) {
              var l = 0;
              function h(s, o, r, a) {
                return function () {
                  function e() {
                    var e, t;
                    if (!(s < l)) {
                      if ((e = r.apply(i, n)) === o.promise())
                        throw new TypeError("Thenable self-resolution");
                      ((t =
                        e &&
                        ("object" == typeof e || "function" == typeof e) &&
                        e.then),
                        g(t)
                          ? a
                            ? t.call(e, h(l, o, L, a), h(l, o, z, a))
                            : (l++,
                              t.call(
                                e,
                                h(l, o, L, a),
                                h(l, o, z, a),
                                h(l, o, L, o.notifyWith),
                              ))
                          : (r !== L && ((i = void 0), (n = [e])),
                            (a || o.resolveWith)(i, n)));
                    }
                  }
                  var i = this,
                    n = arguments,
                    t = a
                      ? e
                      : function () {
                          try {
                            e();
                          } catch (e) {
                            (C.Deferred.exceptionHook &&
                              C.Deferred.exceptionHook(e, t.stackTrace),
                              l <= s + 1 &&
                                (r !== z && ((i = void 0), (n = [e])),
                                o.rejectWith(i, n)));
                          }
                        };
                  s
                    ? t()
                    : (C.Deferred.getStackHook &&
                        (t.stackTrace = C.Deferred.getStackHook()),
                      x.setTimeout(t));
                };
              }
              return C.Deferred(function (e) {
                (o[0][3].add(h(0, e, g(n) ? n : L, e.notifyWith)),
                  o[1][3].add(h(0, e, g(t) ? t : L)),
                  o[2][3].add(h(0, e, g(i) ? i : z)));
              }).promise();
            },
            promise: function (e) {
              return null != e ? C.extend(e, r) : r;
            },
          },
          a = {};
        return (
          C.each(o, function (e, t) {
            var i = t[2],
              n = t[5];
            ((r[t[1]] = i.add),
              n &&
                i.add(
                  function () {
                    s = n;
                  },
                  o[3 - e][2].disable,
                  o[3 - e][3].disable,
                  o[0][2].lock,
                  o[0][3].lock,
                ),
              i.add(t[3].fire),
              (a[t[0]] = function () {
                return (
                  a[t[0] + "With"](this === a ? void 0 : this, arguments),
                  this
                );
              }),
              (a[t[0] + "With"] = i.fireWith));
          }),
          r.promise(a),
          e && e.call(a, a),
          a
        );
      },
      when: function (e) {
        function t(t) {
          return function (e) {
            ((s[t] = this),
              (o[t] = 1 < arguments.length ? a.call(arguments) : e),
              --i || r.resolveWith(s, o));
          };
        }
        var i = arguments.length,
          n = i,
          s = Array(n),
          o = a.call(arguments),
          r = C.Deferred();
        if (
          i <= 1 &&
          (j(e, r.done(t(n)).resolve, r.reject, !i),
          "pending" === r.state() || g(o[n] && o[n].then))
        )
          return r.then();
        for (; n--; ) j(o[n], t(n), r.reject);
        return r.promise();
      },
    }));
  var F = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  ((C.Deferred.exceptionHook = function (e, t) {
    x.console &&
      x.console.warn &&
      e &&
      F.test(e.name) &&
      x.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t);
  }),
    (C.readyException = function (e) {
      x.setTimeout(function () {
        throw e;
      });
    }));
  var R = C.Deferred();
  function $() {
    (P.removeEventListener("DOMContentLoaded", $),
      x.removeEventListener("load", $),
      C.ready());
  }
  ((C.fn.ready = function (e) {
    return (
      R.then(e).catch(function (e) {
        C.readyException(e);
      }),
      this
    );
  }),
    C.extend({
      isReady: !1,
      readyWait: 1,
      ready: function (e) {
        (!0 === e ? --C.readyWait : C.isReady) ||
          ((C.isReady = !0) !== e && 0 < --C.readyWait) ||
          R.resolveWith(P, [C]);
      },
    }),
    (C.ready.then = R.then),
    "complete" === P.readyState ||
    ("loading" !== P.readyState && !P.documentElement.doScroll)
      ? x.setTimeout(C.ready)
      : (P.addEventListener("DOMContentLoaded", $),
        x.addEventListener("load", $)));
  function q(e, t, i, n, s, o, r) {
    var a = 0,
      l = e.length,
      h = null == i;
    if ("object" === f(i)) for (a in ((s = !0), i)) q(e, t, a, i[a], !0, o, r);
    else if (
      void 0 !== n &&
      ((s = !0),
      g(n) || (r = !0),
      (t = h
        ? r
          ? (t.call(e, n), null)
          : ((h = t),
            function (e, t, i) {
              return h.call(C(e), i);
            })
        : t))
    )
      for (; a < l; a++) t(e[a], i, r ? n : n.call(e[a], a, t(e[a], i)));
    return s ? e : h ? t.call(e) : l ? t(e[0], i) : o;
  }
  var W = /^-ms-/,
    B = /-([a-z])/g;
  function U(e, t) {
    return t.toUpperCase();
  }
  function V(e) {
    return e.replace(W, "ms-").replace(B, U);
  }
  function Y(e) {
    return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType;
  }
  function Q() {
    this.expando = C.expando + Q.uid++;
  }
  ((Q.uid = 1),
    (Q.prototype = {
      cache: function (e) {
        var t = e[this.expando];
        return (
          t ||
            ((t = {}),
            Y(e) &&
              (e.nodeType
                ? (e[this.expando] = t)
                : Object.defineProperty(e, this.expando, {
                    value: t,
                    configurable: !0,
                  }))),
          t
        );
      },
      set: function (e, t, i) {
        var n,
          s = this.cache(e);
        if ("string" == typeof t) s[V(t)] = i;
        else for (n in t) s[V(n)] = t[n];
        return s;
      },
      get: function (e, t) {
        return void 0 === t
          ? this.cache(e)
          : e[this.expando] && e[this.expando][V(t)];
      },
      access: function (e, t, i) {
        return void 0 === t || (t && "string" == typeof t && void 0 === i)
          ? this.get(e, t)
          : (this.set(e, t, i), void 0 !== i ? i : t);
      },
      remove: function (e, t) {
        var i,
          n = e[this.expando];
        if (void 0 !== n) {
          if (void 0 !== t) {
            i = (t = Array.isArray(t)
              ? t.map(V)
              : (t = V(t)) in n
                ? [t]
                : t.match(N) || []).length;
            for (; i--; ) delete n[t[i]];
          }
          (void 0 !== t && !C.isEmptyObject(n)) ||
            (e.nodeType ? (e[this.expando] = void 0) : delete e[this.expando]);
        }
      },
      hasData: function (e) {
        e = e[this.expando];
        return void 0 !== e && !C.isEmptyObject(e);
      },
    }));
  var Z = new Q(),
    X = new Q(),
    K = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    G = /[A-Z]/g;
  function J(e, t, i) {
    var n, s;
    if (void 0 === i && 1 === e.nodeType)
      if (
        ((n = "data-" + t.replace(G, "-$&").toLowerCase()),
        "string" == typeof (i = e.getAttribute(n)))
      ) {
        try {
          i =
            "true" === (s = i) ||
            ("false" !== s &&
              ("null" === s
                ? null
                : s === +s + ""
                  ? +s
                  : K.test(s)
                    ? JSON.parse(s)
                    : s));
        } catch (e) {}
        X.set(e, t, i);
      } else i = void 0;
    return i;
  }
  (C.extend({
    hasData: function (e) {
      return X.hasData(e) || Z.hasData(e);
    },
    data: function (e, t, i) {
      return X.access(e, t, i);
    },
    removeData: function (e, t) {
      X.remove(e, t);
    },
    _data: function (e, t, i) {
      return Z.access(e, t, i);
    },
    _removeData: function (e, t) {
      Z.remove(e, t);
    },
  }),
    C.fn.extend({
      data: function (i, e) {
        var t,
          n,
          s,
          o = this[0],
          r = o && o.attributes;
        if (void 0 !== i)
          return "object" == typeof i
            ? this.each(function () {
                X.set(this, i);
              })
            : q(
                this,
                function (e) {
                  var t;
                  return o && void 0 === e
                    ? void 0 !== (t = X.get(o, i)) || void 0 !== (t = J(o, i))
                      ? t
                      : void 0
                    : void this.each(function () {
                        X.set(this, i, e);
                      });
                },
                null,
                e,
                1 < arguments.length,
                null,
                !0,
              );
        if (
          this.length &&
          ((s = X.get(o)), 1 === o.nodeType && !Z.get(o, "hasDataAttrs"))
        ) {
          for (t = r.length; t--; )
            r[t] &&
              0 === (n = r[t].name).indexOf("data-") &&
              ((n = V(n.slice(5))), J(o, n, s[n]));
          Z.set(o, "hasDataAttrs", !0);
        }
        return s;
      },
      removeData: function (e) {
        return this.each(function () {
          X.remove(this, e);
        });
      },
    }),
    C.extend({
      queue: function (e, t, i) {
        var n;
        if (e)
          return (
            (n = Z.get(e, (t = (t || "fx") + "queue"))),
            i &&
              (!n || Array.isArray(i)
                ? (n = Z.access(e, t, C.makeArray(i)))
                : n.push(i)),
            n || []
          );
      },
      dequeue: function (e, t) {
        t = t || "fx";
        var i = C.queue(e, t),
          n = i.length,
          s = i.shift(),
          o = C._queueHooks(e, t);
        ("inprogress" === s && ((s = i.shift()), n--),
          s &&
            ("fx" === t && i.unshift("inprogress"),
            delete o.stop,
            s.call(
              e,
              function () {
                C.dequeue(e, t);
              },
              o,
            )),
          !n && o && o.empty.fire());
      },
      _queueHooks: function (e, t) {
        var i = t + "queueHooks";
        return (
          Z.get(e, i) ||
          Z.access(e, i, {
            empty: C.Callbacks("once memory").add(function () {
              Z.remove(e, [t + "queue", i]);
            }),
          })
        );
      },
    }),
    C.fn.extend({
      queue: function (t, i) {
        var e = 2;
        return (
          "string" != typeof t && ((i = t), (t = "fx"), e--),
          arguments.length < e
            ? C.queue(this[0], t)
            : void 0 === i
              ? this
              : this.each(function () {
                  var e = C.queue(this, t, i);
                  (C._queueHooks(this, t),
                    "fx" === t && "inprogress" !== e[0] && C.dequeue(this, t));
                })
        );
      },
      dequeue: function (e) {
        return this.each(function () {
          C.dequeue(this, e);
        });
      },
      clearQueue: function (e) {
        return this.queue(e || "fx", []);
      },
      promise: function (e, t) {
        function i() {
          --s || o.resolveWith(r, [r]);
        }
        var n,
          s = 1,
          o = C.Deferred(),
          r = this,
          a = this.length;
        for (
          "string" != typeof e && ((t = e), (e = void 0)), e = e || "fx";
          a--;

        )
          (n = Z.get(r[a], e + "queueHooks")) &&
            n.empty &&
            (s++, n.empty.add(i));
        return (i(), o.promise(t));
      },
    }));
  var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"),
    ie = ["Top", "Right", "Bottom", "Left"],
    ne = P.documentElement,
    se = function (e) {
      return C.contains(e.ownerDocument, e);
    },
    oe = { composed: !0 };
  ne.getRootNode &&
    (se = function (e) {
      return (
        C.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument
      );
    });
  function re(e, t) {
    return (
      "none" === (e = t || e).style.display ||
      ("" === e.style.display && se(e) && "none" === C.css(e, "display"))
    );
  }
  function ae(e, t, i, n) {
    var s,
      o,
      r = 20,
      a = n
        ? function () {
            return n.cur();
          }
        : function () {
            return C.css(e, t, "");
          },
      l = a(),
      h = (i && i[3]) || (C.cssNumber[t] ? "" : "px"),
      c =
        e.nodeType &&
        (C.cssNumber[t] || ("px" !== h && +l)) &&
        te.exec(C.css(e, t));
    if (c && c[3] !== h) {
      for (h = h || c[3], c = +(l /= 2) || 1; r--; )
        (C.style(e, t, c + h),
          (1 - o) * (1 - (o = a() / l || 0.5)) <= 0 && (r = 0),
          (c /= o));
      (C.style(e, t, (c *= 2) + h), (i = i || []));
    }
    return (
      i &&
        ((c = +c || +l || 0),
        (s = i[1] ? c + (i[1] + 1) * i[2] : +i[2]),
        n && ((n.unit = h), (n.start = c), (n.end = s))),
      s
    );
  }
  var le = {};
  function he(e, t) {
    for (var i, n, s, o, r, a, l = [], h = 0, c = e.length; h < c; h++)
      (n = e[h]).style &&
        ((i = n.style.display),
        t
          ? ("none" === i &&
              ((l[h] = Z.get(n, "display") || null),
              l[h] || (n.style.display = "")),
            "" === n.style.display &&
              re(n) &&
              (l[h] =
                ((a = o = s = void 0),
                (o = n.ownerDocument),
                (r = n.nodeName),
                (a = le[r]) ||
                  ((s = o.body.appendChild(o.createElement(r))),
                  (a = C.css(s, "display")),
                  s.parentNode.removeChild(s),
                  (le[r] = a = "none" === a ? "block" : a)))))
          : "none" !== i && ((l[h] = "none"), Z.set(n, "display", i)));
    for (h = 0; h < c; h++) null != l[h] && (e[h].style.display = l[h]);
    return e;
  }
  C.fn.extend({
    show: function () {
      return he(this, !0);
    },
    hide: function () {
      return he(this);
    },
    toggle: function (e) {
      return "boolean" == typeof e
        ? e
          ? this.show()
          : this.hide()
        : this.each(function () {
            re(this) ? C(this).show() : C(this).hide();
          });
    },
  });
  var ce = /^(?:checkbox|radio)$/i,
    ue = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i,
    de = /^$|^module$|\/(?:java|ecma)script/i,
    u = P.createDocumentFragment().appendChild(P.createElement("div"));
  ((p = P.createElement("input")).setAttribute("type", "radio"),
    p.setAttribute("checked", "checked"),
    p.setAttribute("name", "t"),
    u.appendChild(p),
    (y.checkClone = u.cloneNode(!0).cloneNode(!0).lastChild.checked),
    (u.innerHTML = "<textarea>x</textarea>"),
    (y.noCloneChecked = !!u.cloneNode(!0).lastChild.defaultValue),
    (u.innerHTML = "<option></option>"),
    (y.option = !!u.lastChild));
  var pe = {
    thead: [1, "<table>", "</table>"],
    col: [2, "<table><colgroup>", "</colgroup></table>"],
    tr: [2, "<table><tbody>", "</tbody></table>"],
    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
    _default: [0, "", ""],
  };
  function fe(e, t) {
    var i =
      void 0 !== e.getElementsByTagName
        ? e.getElementsByTagName(t || "*")
        : void 0 !== e.querySelectorAll
          ? e.querySelectorAll(t || "*")
          : [];
    return void 0 === t || (t && H(e, t)) ? C.merge([e], i) : i;
  }
  function ge(e, t) {
    for (var i = 0, n = e.length; i < n; i++)
      Z.set(e[i], "globalEval", !t || Z.get(t[i], "globalEval"));
  }
  ((pe.tbody = pe.tfoot = pe.colgroup = pe.caption = pe.thead),
    (pe.th = pe.td),
    y.option ||
      (pe.optgroup = pe.option =
        [1, "<select multiple='multiple'>", "</select>"]));
  var me = /<|&#?\w+;/;
  function ve(e, t, i, n, s) {
    for (
      var o,
        r,
        a,
        l,
        h,
        c = t.createDocumentFragment(),
        u = [],
        d = 0,
        p = e.length;
      d < p;
      d++
    )
      if ((o = e[d]) || 0 === o)
        if ("object" === f(o)) C.merge(u, o.nodeType ? [o] : o);
        else if (me.test(o)) {
          for (
            r = r || c.appendChild(t.createElement("div")),
              a = (ue.exec(o) || ["", ""])[1].toLowerCase(),
              a = pe[a] || pe._default,
              r.innerHTML = a[1] + C.htmlPrefilter(o) + a[2],
              h = a[0];
            h--;

          )
            r = r.lastChild;
          (C.merge(u, r.childNodes), ((r = c.firstChild).textContent = ""));
        } else u.push(t.createTextNode(o));
    for (c.textContent = "", d = 0; (o = u[d++]); )
      if (n && -1 < C.inArray(o, n)) s && s.push(o);
      else if (
        ((l = se(o)), (r = fe(c.appendChild(o), "script")), l && ge(r), i)
      )
        for (h = 0; (o = r[h++]); ) de.test(o.type || "") && i.push(o);
    return c;
  }
  var be = /^key/,
    ye = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    _e = /^([^.]*)(?:\.(.+)|)/;
  function we() {
    return !0;
  }
  function xe() {
    return !1;
  }
  function Pe(e, t) {
    return (
      (e ===
        (function () {
          try {
            return P.activeElement;
          } catch (e) {}
        })()) ==
      ("focus" === t)
    );
  }
  function Ce(e, t, i, n, s, o) {
    var r, a;
    if ("object" == typeof t) {
      for (a in ("string" != typeof i && ((n = n || i), (i = void 0)), t))
        Ce(e, a, i, n, t[a], o);
      return e;
    }
    if (
      (null == n && null == s
        ? ((s = i), (n = i = void 0))
        : null == s &&
          ("string" == typeof i
            ? ((s = n), (n = void 0))
            : ((s = n), (n = i), (i = void 0))),
      !1 === s)
    )
      s = xe;
    else if (!s) return e;
    return (
      1 === o &&
        ((r = s),
        ((s = function (e) {
          return (C().off(e), r.apply(this, arguments));
        }).guid = r.guid || (r.guid = C.guid++))),
      e.each(function () {
        C.event.add(this, t, s, n, i);
      })
    );
  }
  function ke(e, s, o) {
    o
      ? (Z.set(e, s, !1),
        C.event.add(e, s, {
          namespace: !1,
          handler: function (e) {
            var t,
              i,
              n = Z.get(this, s);
            if (1 & e.isTrigger && this[s]) {
              if (n.length)
                (C.event.special[s] || {}).delegateType && e.stopPropagation();
              else if (
                ((n = a.call(arguments)),
                Z.set(this, s, n),
                (t = o(this, s)),
                this[s](),
                n !== (i = Z.get(this, s)) || t ? Z.set(this, s, !1) : (i = {}),
                n !== i)
              )
                return (
                  e.stopImmediatePropagation(),
                  e.preventDefault(),
                  i.value
                );
            } else
              n.length &&
                (Z.set(this, s, {
                  value: C.event.trigger(
                    C.extend(n[0], C.Event.prototype),
                    n.slice(1),
                    this,
                  ),
                }),
                e.stopImmediatePropagation());
          },
        }))
      : void 0 === Z.get(e, s) && C.event.add(e, s, we);
  }
  ((C.event = {
    global: {},
    add: function (t, e, i, n, s) {
      var o,
        r,
        a,
        l,
        h,
        c,
        u,
        d,
        p,
        f = Z.get(t);
      if (Y(t))
        for (
          i.handler && ((i = (o = i).handler), (s = o.selector)),
            s && C.find.matchesSelector(ne, s),
            i.guid || (i.guid = C.guid++),
            (a = f.events) || (a = f.events = Object.create(null)),
            (r = f.handle) ||
              (r = f.handle =
                function (e) {
                  return void 0 !== C && C.event.triggered !== e.type
                    ? C.event.dispatch.apply(t, arguments)
                    : void 0;
                }),
            l = (e = (e || "").match(N) || [""]).length;
          l--;

        )
          ((u = p = (h = _e.exec(e[l]) || [])[1]),
            (d = (h[2] || "").split(".").sort()),
            u &&
              ((c = C.event.special[u] || {}),
              (u = (s ? c.delegateType : c.bindType) || u),
              (c = C.event.special[u] || {}),
              (h = C.extend(
                {
                  type: u,
                  origType: p,
                  data: n,
                  handler: i,
                  guid: i.guid,
                  selector: s,
                  needsContext: s && C.expr.match.needsContext.test(s),
                  namespace: d.join("."),
                },
                o,
              )),
              (p = a[u]) ||
                (((p = a[u] = []).delegateCount = 0),
                (c.setup && !1 !== c.setup.call(t, n, d, r)) ||
                  (t.addEventListener && t.addEventListener(u, r))),
              c.add &&
                (c.add.call(t, h), h.handler.guid || (h.handler.guid = i.guid)),
              s ? p.splice(p.delegateCount++, 0, h) : p.push(h),
              (C.event.global[u] = !0)));
    },
    remove: function (e, t, i, n, s) {
      var o,
        r,
        a,
        l,
        h,
        c,
        u,
        d,
        p,
        f,
        g,
        m = Z.hasData(e) && Z.get(e);
      if (m && (l = m.events)) {
        for (h = (t = (t || "").match(N) || [""]).length; h--; )
          if (
            ((p = g = (a = _e.exec(t[h]) || [])[1]),
            (f = (a[2] || "").split(".").sort()),
            p)
          ) {
            for (
              u = C.event.special[p] || {},
                d = l[(p = (n ? u.delegateType : u.bindType) || p)] || [],
                a =
                  a[2] &&
                  new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"),
                r = o = d.length;
              o--;

            )
              ((c = d[o]),
                (!s && g !== c.origType) ||
                  (i && i.guid !== c.guid) ||
                  (a && !a.test(c.namespace)) ||
                  (n && n !== c.selector && ("**" !== n || !c.selector)) ||
                  (d.splice(o, 1),
                  c.selector && d.delegateCount--,
                  u.remove && u.remove.call(e, c)));
            r &&
              !d.length &&
              ((u.teardown && !1 !== u.teardown.call(e, f, m.handle)) ||
                C.removeEvent(e, p, m.handle),
              delete l[p]);
          } else for (p in l) C.event.remove(e, p + t[h], i, n, !0);
        C.isEmptyObject(l) && Z.remove(e, "handle events");
      }
    },
    dispatch: function (e) {
      var t,
        i,
        n,
        s,
        o,
        r = new Array(arguments.length),
        a = C.event.fix(e),
        l = (Z.get(this, "events") || Object.create(null))[a.type] || [],
        e = C.event.special[a.type] || {};
      for (r[0] = a, t = 1; t < arguments.length; t++) r[t] = arguments[t];
      if (
        ((a.delegateTarget = this),
        !e.preDispatch || !1 !== e.preDispatch.call(this, a))
      ) {
        for (
          o = C.event.handlers.call(this, a, l), t = 0;
          (n = o[t++]) && !a.isPropagationStopped();

        )
          for (
            a.currentTarget = n.elem, i = 0;
            (s = n.handlers[i++]) && !a.isImmediatePropagationStopped();

          )
            (a.rnamespace &&
              !1 !== s.namespace &&
              !a.rnamespace.test(s.namespace)) ||
              ((a.handleObj = s),
              (a.data = s.data),
              void 0 !==
                (s = (
                  (C.event.special[s.origType] || {}).handle || s.handler
                ).apply(n.elem, r)) &&
                !1 === (a.result = s) &&
                (a.preventDefault(), a.stopPropagation()));
        return (e.postDispatch && e.postDispatch.call(this, a), a.result);
      }
    },
    handlers: function (e, t) {
      var i,
        n,
        s,
        o,
        r,
        a = [],
        l = t.delegateCount,
        h = e.target;
      if (l && h.nodeType && !("click" === e.type && 1 <= e.button))
        for (; h !== this; h = h.parentNode || this)
          if (1 === h.nodeType && ("click" !== e.type || !0 !== h.disabled)) {
            for (o = [], r = {}, i = 0; i < l; i++)
              (void 0 === r[(s = (n = t[i]).selector + " ")] &&
                (r[s] = n.needsContext
                  ? -1 < C(s, this).index(h)
                  : C.find(s, this, null, [h]).length),
                r[s] && o.push(n));
            o.length && a.push({ elem: h, handlers: o });
          }
      return (
        (h = this),
        l < t.length && a.push({ elem: h, handlers: t.slice(l) }),
        a
      );
    },
    addProp: function (t, e) {
      Object.defineProperty(C.Event.prototype, t, {
        enumerable: !0,
        configurable: !0,
        get: g(e)
          ? function () {
              if (this.originalEvent) return e(this.originalEvent);
            }
          : function () {
              if (this.originalEvent) return this.originalEvent[t];
            },
        set: function (e) {
          Object.defineProperty(this, t, {
            enumerable: !0,
            configurable: !0,
            writable: !0,
            value: e,
          });
        },
      });
    },
    fix: function (e) {
      return e[C.expando] ? e : new C.Event(e);
    },
    special: {
      load: { noBubble: !0 },
      click: {
        setup: function (e) {
          e = this || e;
          return (
            ce.test(e.type) && e.click && H(e, "input") && ke(e, "click", we),
            !1
          );
        },
        trigger: function (e) {
          e = this || e;
          return (
            ce.test(e.type) && e.click && H(e, "input") && ke(e, "click"),
            !0
          );
        },
        _default: function (e) {
          e = e.target;
          return (
            (ce.test(e.type) &&
              e.click &&
              H(e, "input") &&
              Z.get(e, "click")) ||
            H(e, "a")
          );
        },
      },
      beforeunload: {
        postDispatch: function (e) {
          void 0 !== e.result &&
            e.originalEvent &&
            (e.originalEvent.returnValue = e.result);
        },
      },
    },
  }),
    (C.removeEvent = function (e, t, i) {
      e.removeEventListener && e.removeEventListener(t, i);
    }),
    (C.Event = function (e, t) {
      if (!(this instanceof C.Event)) return new C.Event(e, t);
      (e && e.type
        ? ((this.originalEvent = e),
          (this.type = e.type),
          (this.isDefaultPrevented =
            e.defaultPrevented ||
            (void 0 === e.defaultPrevented && !1 === e.returnValue)
              ? we
              : xe),
          (this.target =
            e.target && 3 === e.target.nodeType
              ? e.target.parentNode
              : e.target),
          (this.currentTarget = e.currentTarget),
          (this.relatedTarget = e.relatedTarget))
        : (this.type = e),
        t && C.extend(this, t),
        (this.timeStamp = (e && e.timeStamp) || Date.now()),
        (this[C.expando] = !0));
    }),
    (C.Event.prototype = {
      constructor: C.Event,
      isDefaultPrevented: xe,
      isPropagationStopped: xe,
      isImmediatePropagationStopped: xe,
      isSimulated: !1,
      preventDefault: function () {
        var e = this.originalEvent;
        ((this.isDefaultPrevented = we),
          e && !this.isSimulated && e.preventDefault());
      },
      stopPropagation: function () {
        var e = this.originalEvent;
        ((this.isPropagationStopped = we),
          e && !this.isSimulated && e.stopPropagation());
      },
      stopImmediatePropagation: function () {
        var e = this.originalEvent;
        ((this.isImmediatePropagationStopped = we),
          e && !this.isSimulated && e.stopImmediatePropagation(),
          this.stopPropagation());
      },
    }),
    C.each(
      {
        altKey: !0,
        bubbles: !0,
        cancelable: !0,
        changedTouches: !0,
        ctrlKey: !0,
        detail: !0,
        eventPhase: !0,
        metaKey: !0,
        pageX: !0,
        pageY: !0,
        shiftKey: !0,
        view: !0,
        char: !0,
        code: !0,
        charCode: !0,
        key: !0,
        keyCode: !0,
        button: !0,
        buttons: !0,
        clientX: !0,
        clientY: !0,
        offsetX: !0,
        offsetY: !0,
        pointerId: !0,
        pointerType: !0,
        screenX: !0,
        screenY: !0,
        targetTouches: !0,
        toElement: !0,
        touches: !0,
        which: function (e) {
          var t = e.button;
          return null == e.which && be.test(e.type)
            ? null != e.charCode
              ? e.charCode
              : e.keyCode
            : !e.which && void 0 !== t && ye.test(e.type)
              ? 1 & t
                ? 1
                : 2 & t
                  ? 3
                  : 4 & t
                    ? 2
                    : 0
              : e.which;
        },
      },
      C.event.addProp,
    ),
    C.each({ focus: "focusin", blur: "focusout" }, function (e, t) {
      C.event.special[e] = {
        setup: function () {
          return (ke(this, e, Pe), !1);
        },
        trigger: function () {
          return (ke(this, e), !0);
        },
        delegateType: t,
      };
    }),
    C.each(
      {
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout",
      },
      function (e, s) {
        C.event.special[e] = {
          delegateType: s,
          bindType: s,
          handle: function (e) {
            var t,
              i = e.relatedTarget,
              n = e.handleObj;
            return (
              (i && (i === this || C.contains(this, i))) ||
                ((e.type = n.origType),
                (t = n.handler.apply(this, arguments)),
                (e.type = s)),
              t
            );
          },
        };
      },
    ),
    C.fn.extend({
      on: function (e, t, i, n) {
        return Ce(this, e, t, i, n);
      },
      one: function (e, t, i, n) {
        return Ce(this, e, t, i, n, 1);
      },
      off: function (e, t, i) {
        var n, s;
        if (e && e.preventDefault && e.handleObj)
          return (
            (n = e.handleObj),
            C(e.delegateTarget).off(
              n.namespace ? n.origType + "." + n.namespace : n.origType,
              n.selector,
              n.handler,
            ),
            this
          );
        if ("object" != typeof e)
          return (
            (!1 !== t && "function" != typeof t) || ((i = t), (t = void 0)),
            !1 === i && (i = xe),
            this.each(function () {
              C.event.remove(this, e, i, t);
            })
          );
        for (s in e) this.off(s, t, e[s]);
        return this;
      },
    }));
  var Te = /<script|<style|<link/i,
    He = /checked\s*(?:[^=]|=\s*.checked.)/i,
    De = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  function Ie(e, t) {
    return (
      (H(e, "table") &&
        H(11 !== t.nodeType ? t : t.firstChild, "tr") &&
        C(e).children("tbody")[0]) ||
      e
    );
  }
  function Se(e) {
    return ((e.type = (null !== e.getAttribute("type")) + "/" + e.type), e);
  }
  function Ee(e) {
    return (
      "true/" === (e.type || "").slice(0, 5)
        ? (e.type = e.type.slice(5))
        : e.removeAttribute("type"),
      e
    );
  }
  function Ae(e, t) {
    var i, n, s, o;
    if (1 === t.nodeType) {
      if (Z.hasData(e) && (o = Z.get(e).events))
        for (s in (Z.remove(t, "handle events"), o))
          for (i = 0, n = o[s].length; i < n; i++) C.event.add(t, s, o[s][i]);
      X.hasData(e) && ((e = X.access(e)), (e = C.extend({}, e)), X.set(t, e));
    }
  }
  function Me(i, n, s, o) {
    n = v(n);
    var e,
      t,
      r,
      a,
      l,
      h,
      c = 0,
      u = i.length,
      d = u - 1,
      p = n[0],
      f = g(p);
    if (f || (1 < u && "string" == typeof p && !y.checkClone && He.test(p)))
      return i.each(function (e) {
        var t = i.eq(e);
        (f && (n[0] = p.call(this, e, t.html())), Me(t, n, s, o));
      });
    if (
      u &&
      ((t = (e = ve(n, i[0].ownerDocument, !1, i, o)).firstChild),
      1 === e.childNodes.length && (e = t),
      t || o)
    ) {
      for (a = (r = C.map(fe(e, "script"), Se)).length; c < u; c++)
        ((l = e),
          c !== d &&
            ((l = C.clone(l, !0, !0)), a && C.merge(r, fe(l, "script"))),
          s.call(i[c], l, c));
      if (a)
        for (h = r[r.length - 1].ownerDocument, C.map(r, Ee), c = 0; c < a; c++)
          ((l = r[c]),
            de.test(l.type || "") &&
              !Z.access(l, "globalEval") &&
              C.contains(h, l) &&
              (l.src && "module" !== (l.type || "").toLowerCase()
                ? C._evalUrl &&
                  !l.noModule &&
                  C._evalUrl(
                    l.src,
                    { nonce: l.nonce || l.getAttribute("nonce") },
                    h,
                  )
                : _(l.textContent.replace(De, ""), l, h)));
    }
    return i;
  }
  function Oe(e, t, i) {
    for (var n, s = t ? C.filter(t, e) : e, o = 0; null != (n = s[o]); o++)
      (i || 1 !== n.nodeType || C.cleanData(fe(n)),
        n.parentNode &&
          (i && se(n) && ge(fe(n, "script")), n.parentNode.removeChild(n)));
    return e;
  }
  (C.extend({
    htmlPrefilter: function (e) {
      return e;
    },
    clone: function (e, t, i) {
      var n,
        s,
        o,
        r,
        a,
        l,
        h,
        c = e.cloneNode(!0),
        u = se(e);
      if (
        !(
          y.noCloneChecked ||
          (1 !== e.nodeType && 11 !== e.nodeType) ||
          C.isXMLDoc(e)
        )
      )
        for (r = fe(c), n = 0, s = (o = fe(e)).length; n < s; n++)
          ((a = o[n]),
            "input" === (h = (l = r[n]).nodeName.toLowerCase()) &&
            ce.test(a.type)
              ? (l.checked = a.checked)
              : ("input" !== h && "textarea" !== h) ||
                (l.defaultValue = a.defaultValue));
      if (t)
        if (i)
          for (o = o || fe(e), r = r || fe(c), n = 0, s = o.length; n < s; n++)
            Ae(o[n], r[n]);
        else Ae(e, c);
      return (
        0 < (r = fe(c, "script")).length && ge(r, !u && fe(e, "script")),
        c
      );
    },
    cleanData: function (e) {
      for (var t, i, n, s = C.event.special, o = 0; void 0 !== (i = e[o]); o++)
        if (Y(i)) {
          if ((t = i[Z.expando])) {
            if (t.events)
              for (n in t.events)
                s[n] ? C.event.remove(i, n) : C.removeEvent(i, n, t.handle);
            i[Z.expando] = void 0;
          }
          i[X.expando] && (i[X.expando] = void 0);
        }
    },
  }),
    C.fn.extend({
      detach: function (e) {
        return Oe(this, e, !0);
      },
      remove: function (e) {
        return Oe(this, e);
      },
      text: function (e) {
        return q(
          this,
          function (e) {
            return void 0 === e
              ? C.text(this)
              : this.empty().each(function () {
                  (1 !== this.nodeType &&
                    11 !== this.nodeType &&
                    9 !== this.nodeType) ||
                    (this.textContent = e);
                });
          },
          null,
          e,
          arguments.length,
        );
      },
      append: function () {
        return Me(this, arguments, function (e) {
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            Ie(this, e).appendChild(e);
        });
      },
      prepend: function () {
        return Me(this, arguments, function (e) {
          var t;
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            (t = Ie(this, e)).insertBefore(e, t.firstChild);
        });
      },
      before: function () {
        return Me(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this);
        });
      },
      after: function () {
        return Me(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this.nextSibling);
        });
      },
      empty: function () {
        for (var e, t = 0; null != (e = this[t]); t++)
          1 === e.nodeType && (C.cleanData(fe(e, !1)), (e.textContent = ""));
        return this;
      },
      clone: function (e, t) {
        return (
          (e = null != e && e),
          (t = null == t ? e : t),
          this.map(function () {
            return C.clone(this, e, t);
          })
        );
      },
      html: function (e) {
        return q(
          this,
          function (e) {
            var t = this[0] || {},
              i = 0,
              n = this.length;
            if (void 0 === e && 1 === t.nodeType) return t.innerHTML;
            if (
              "string" == typeof e &&
              !Te.test(e) &&
              !pe[(ue.exec(e) || ["", ""])[1].toLowerCase()]
            ) {
              e = C.htmlPrefilter(e);
              try {
                for (; i < n; i++)
                  1 === (t = this[i] || {}).nodeType &&
                    (C.cleanData(fe(t, !1)), (t.innerHTML = e));
                t = 0;
              } catch (e) {}
            }
            t && this.empty().append(e);
          },
          null,
          e,
          arguments.length,
        );
      },
      replaceWith: function () {
        var i = [];
        return Me(
          this,
          arguments,
          function (e) {
            var t = this.parentNode;
            C.inArray(this, i) < 0 &&
              (C.cleanData(fe(this)), t && t.replaceChild(e, this));
          },
          i,
        );
      },
    }),
    C.each(
      {
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith",
      },
      function (e, r) {
        C.fn[e] = function (e) {
          for (var t, i = [], n = C(e), s = n.length - 1, o = 0; o <= s; o++)
            ((t = o === s ? this : this.clone(!0)),
              C(n[o])[r](t),
              l.apply(i, t.get()));
          return this.pushStack(i);
        };
      },
    ));
  function Ne(e) {
    var t = e.ownerDocument.defaultView;
    return (t = !t || !t.opener ? x : t).getComputedStyle(e);
  }
  function Le(e, t, i) {
    var n,
      s = {};
    for (n in t) ((s[n] = e.style[n]), (e.style[n] = t[n]));
    for (n in ((i = i.call(e)), t)) e.style[n] = s[n];
    return i;
  }
  var ze,
    je,
    Fe,
    Re,
    $e,
    qe,
    We,
    Be,
    Ue = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"),
    Ve = new RegExp(ie.join("|"), "i");
  function Ye(e, t, i) {
    var n,
      s,
      o = e.style;
    return (
      (i = i || Ne(e)) &&
        ("" !== (s = i.getPropertyValue(t) || i[t]) ||
          se(e) ||
          (s = C.style(e, t)),
        !y.pixelBoxStyles() &&
          Ue.test(s) &&
          Ve.test(t) &&
          ((n = o.width),
          (e = o.minWidth),
          (t = o.maxWidth),
          (o.minWidth = o.maxWidth = o.width = s),
          (s = i.width),
          (o.width = n),
          (o.minWidth = e),
          (o.maxWidth = t))),
      void 0 !== s ? s + "" : s
    );
  }
  function Qe(e, t) {
    return {
      get: function () {
        if (!e()) return (this.get = t).apply(this, arguments);
        delete this.get;
      },
    };
  }
  function Ze() {
    var e;
    Be &&
      ((We.style.cssText =
        "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"),
      (Be.style.cssText =
        "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"),
      ne.appendChild(We).appendChild(Be),
      (e = x.getComputedStyle(Be)),
      (ze = "1%" !== e.top),
      (qe = 12 === Xe(e.marginLeft)),
      (Be.style.right = "60%"),
      (Re = 36 === Xe(e.right)),
      (je = 36 === Xe(e.width)),
      (Be.style.position = "absolute"),
      (Fe = 12 === Xe(Be.offsetWidth / 3)),
      ne.removeChild(We),
      (Be = null));
  }
  function Xe(e) {
    return Math.round(parseFloat(e));
  }
  ((We = P.createElement("div")),
    (Be = P.createElement("div")).style &&
      ((Be.style.backgroundClip = "content-box"),
      (Be.cloneNode(!0).style.backgroundClip = ""),
      (y.clearCloneStyle = "content-box" === Be.style.backgroundClip),
      C.extend(y, {
        boxSizingReliable: function () {
          return (Ze(), je);
        },
        pixelBoxStyles: function () {
          return (Ze(), Re);
        },
        pixelPosition: function () {
          return (Ze(), ze);
        },
        reliableMarginLeft: function () {
          return (Ze(), qe);
        },
        scrollboxSize: function () {
          return (Ze(), Fe);
        },
        reliableTrDimensions: function () {
          var e, t, i;
          return (
            null == $e &&
              ((e = P.createElement("table")),
              (i = P.createElement("tr")),
              (t = P.createElement("div")),
              (e.style.cssText = "position:absolute;left:-11111px"),
              (i.style.height = "1px"),
              (t.style.height = "9px"),
              ne.appendChild(e).appendChild(i).appendChild(t),
              (i = x.getComputedStyle(i)),
              ($e = 3 < parseInt(i.height)),
              ne.removeChild(e)),
            $e
          );
        },
      })));
  var Ke = ["Webkit", "Moz", "ms"],
    Ge = P.createElement("div").style,
    Je = {};
  function et(e) {
    return (
      C.cssProps[e] ||
      Je[e] ||
      (e in Ge
        ? e
        : (Je[e] =
            (function (e) {
              for (
                var t = e[0].toUpperCase() + e.slice(1), i = Ke.length;
                i--;

              )
                if ((e = Ke[i] + t) in Ge) return e;
            })(e) || e))
    );
  }
  var tt = /^(none|table(?!-c[ea]).+)/,
    it = /^--/,
    nt = { position: "absolute", visibility: "hidden", display: "block" },
    st = { letterSpacing: "0", fontWeight: "400" };
  function ot(e, t, i) {
    var n = te.exec(t);
    return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : t;
  }
  function rt(e, t, i, n, s, o) {
    var r = "width" === t ? 1 : 0,
      a = 0,
      l = 0;
    if (i === (n ? "border" : "content")) return 0;
    for (; r < 4; r += 2)
      ("margin" === i && (l += C.css(e, i + ie[r], !0, s)),
        n
          ? ("content" === i && (l -= C.css(e, "padding" + ie[r], !0, s)),
            "margin" !== i &&
              (l -= C.css(e, "border" + ie[r] + "Width", !0, s)))
          : ((l += C.css(e, "padding" + ie[r], !0, s)),
            "padding" !== i
              ? (l += C.css(e, "border" + ie[r] + "Width", !0, s))
              : (a += C.css(e, "border" + ie[r] + "Width", !0, s))));
    return (
      !n &&
        0 <= o &&
        (l +=
          Math.max(
            0,
            Math.ceil(
              e["offset" + t[0].toUpperCase() + t.slice(1)] - o - l - a - 0.5,
            ),
          ) || 0),
      l
    );
  }
  function at(e, t, i) {
    var n = Ne(e),
      s =
        (!y.boxSizingReliable() || i) &&
        "border-box" === C.css(e, "boxSizing", !1, n),
      o = s,
      r = Ye(e, t, n),
      a = "offset" + t[0].toUpperCase() + t.slice(1);
    if (Ue.test(r)) {
      if (!i) return r;
      r = "auto";
    }
    return (
      ((!y.boxSizingReliable() && s) ||
        (!y.reliableTrDimensions() && H(e, "tr")) ||
        "auto" === r ||
        (!parseFloat(r) && "inline" === C.css(e, "display", !1, n))) &&
        e.getClientRects().length &&
        ((s = "border-box" === C.css(e, "boxSizing", !1, n)),
        (o = a in e) && (r = e[a])),
      (r = parseFloat(r) || 0) +
        rt(e, t, i || (s ? "border" : "content"), o, n, r) +
        "px"
    );
  }
  function lt(e, t, i, n, s) {
    return new lt.prototype.init(e, t, i, n, s);
  }
  (C.extend({
    cssHooks: {
      opacity: {
        get: function (e, t) {
          if (t) {
            e = Ye(e, "opacity");
            return "" === e ? "1" : e;
          }
        },
      },
    },
    cssNumber: {
      animationIterationCount: !0,
      columnCount: !0,
      fillOpacity: !0,
      flexGrow: !0,
      flexShrink: !0,
      fontWeight: !0,
      gridArea: !0,
      gridColumn: !0,
      gridColumnEnd: !0,
      gridColumnStart: !0,
      gridRow: !0,
      gridRowEnd: !0,
      gridRowStart: !0,
      lineHeight: !0,
      opacity: !0,
      order: !0,
      orphans: !0,
      widows: !0,
      zIndex: !0,
      zoom: !0,
    },
    cssProps: {},
    style: function (e, t, i, n) {
      if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
        var s,
          o,
          r,
          a = V(t),
          l = it.test(t),
          h = e.style;
        if (
          (l || (t = et(a)), (r = C.cssHooks[t] || C.cssHooks[a]), void 0 === i)
        )
          return r && "get" in r && void 0 !== (s = r.get(e, !1, n)) ? s : h[t];
        ("string" == (o = typeof i) &&
          (s = te.exec(i)) &&
          s[1] &&
          ((i = ae(e, t, s)), (o = "number")),
          null != i &&
            i == i &&
            ("number" !== o ||
              l ||
              (i += (s && s[3]) || (C.cssNumber[a] ? "" : "px")),
            y.clearCloneStyle ||
              "" !== i ||
              0 !== t.indexOf("background") ||
              (h[t] = "inherit"),
            (r && "set" in r && void 0 === (i = r.set(e, i, n))) ||
              (l ? h.setProperty(t, i) : (h[t] = i))));
      }
    },
    css: function (e, t, i, n) {
      var s,
        o = V(t);
      return (
        it.test(t) || (t = et(o)),
        "normal" ===
          (s =
            void 0 ===
            (s =
              (o = C.cssHooks[t] || C.cssHooks[o]) && "get" in o
                ? o.get(e, !0, i)
                : s)
              ? Ye(e, t, n)
              : s) &&
          t in st &&
          (s = st[t]),
        "" === i || i
          ? ((t = parseFloat(s)), !0 === i || isFinite(t) ? t || 0 : s)
          : s
      );
    },
  }),
    C.each(["height", "width"], function (e, a) {
      C.cssHooks[a] = {
        get: function (e, t, i) {
          if (t)
            return !tt.test(C.css(e, "display")) ||
              (e.getClientRects().length && e.getBoundingClientRect().width)
              ? at(e, a, i)
              : Le(e, nt, function () {
                  return at(e, a, i);
                });
        },
        set: function (e, t, i) {
          var n,
            s = Ne(e),
            o = !y.scrollboxSize() && "absolute" === s.position,
            r = (o || i) && "border-box" === C.css(e, "boxSizing", !1, s),
            i = i ? rt(e, a, i, r, s) : 0;
          return (
            r &&
              o &&
              (i -= Math.ceil(
                e["offset" + a[0].toUpperCase() + a.slice(1)] -
                  parseFloat(s[a]) -
                  rt(e, a, "border", !1, s) -
                  0.5,
              )),
            i &&
              (n = te.exec(t)) &&
              "px" !== (n[3] || "px") &&
              ((e.style[a] = t), (t = C.css(e, a))),
            ot(0, t, i)
          );
        },
      };
    }),
    (C.cssHooks.marginLeft = Qe(y.reliableMarginLeft, function (e, t) {
      if (t)
        return (
          (parseFloat(Ye(e, "marginLeft")) ||
            e.getBoundingClientRect().left -
              Le(e, { marginLeft: 0 }, function () {
                return e.getBoundingClientRect().left;
              })) + "px"
        );
    })),
    C.each({ margin: "", padding: "", border: "Width" }, function (s, o) {
      ((C.cssHooks[s + o] = {
        expand: function (e) {
          for (
            var t = 0, i = {}, n = "string" == typeof e ? e.split(" ") : [e];
            t < 4;
            t++
          )
            i[s + ie[t] + o] = n[t] || n[t - 2] || n[0];
          return i;
        },
      }),
        "margin" !== s && (C.cssHooks[s + o].set = ot));
    }),
    C.fn.extend({
      css: function (e, t) {
        return q(
          this,
          function (e, t, i) {
            var n,
              s,
              o = {},
              r = 0;
            if (Array.isArray(t)) {
              for (n = Ne(e), s = t.length; r < s; r++)
                o[t[r]] = C.css(e, t[r], !1, n);
              return o;
            }
            return void 0 !== i ? C.style(e, t, i) : C.css(e, t);
          },
          e,
          t,
          1 < arguments.length,
        );
      },
    }),
    (((C.Tween = lt).prototype = {
      constructor: lt,
      init: function (e, t, i, n, s, o) {
        ((this.elem = e),
          (this.prop = i),
          (this.easing = s || C.easing._default),
          (this.options = t),
          (this.start = this.now = this.cur()),
          (this.end = n),
          (this.unit = o || (C.cssNumber[i] ? "" : "px")));
      },
      cur: function () {
        var e = lt.propHooks[this.prop];
        return (e && e.get ? e : lt.propHooks._default).get(this);
      },
      run: function (e) {
        var t,
          i = lt.propHooks[this.prop];
        return (
          this.options.duration
            ? (this.pos = t =
                C.easing[this.easing](
                  e,
                  this.options.duration * e,
                  0,
                  1,
                  this.options.duration,
                ))
            : (this.pos = t = e),
          (this.now = (this.end - this.start) * t + this.start),
          this.options.step &&
            this.options.step.call(this.elem, this.now, this),
          (i && i.set ? i : lt.propHooks._default).set(this),
          this
        );
      },
    }).init.prototype = lt.prototype),
    ((lt.propHooks = {
      _default: {
        get: function (e) {
          return 1 !== e.elem.nodeType ||
            (null != e.elem[e.prop] && null == e.elem.style[e.prop])
            ? e.elem[e.prop]
            : (e = C.css(e.elem, e.prop, "")) && "auto" !== e
              ? e
              : 0;
        },
        set: function (e) {
          C.fx.step[e.prop]
            ? C.fx.step[e.prop](e)
            : 1 !== e.elem.nodeType ||
                (!C.cssHooks[e.prop] && null == e.elem.style[et(e.prop)])
              ? (e.elem[e.prop] = e.now)
              : C.style(e.elem, e.prop, e.now + e.unit);
        },
      },
    }).scrollTop = lt.propHooks.scrollLeft =
      {
        set: function (e) {
          e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now);
        },
      }),
    (C.easing = {
      linear: function (e) {
        return e;
      },
      swing: function (e) {
        return 0.5 - Math.cos(e * Math.PI) / 2;
      },
      _default: "swing",
    }),
    (C.fx = lt.prototype.init),
    (C.fx.step = {}));
  var ht,
    ct,
    ut = /^(?:toggle|show|hide)$/,
    dt = /queueHooks$/;
  function pt() {
    ct &&
      (!1 === P.hidden && x.requestAnimationFrame
        ? x.requestAnimationFrame(pt)
        : x.setTimeout(pt, C.fx.interval),
      C.fx.tick());
  }
  function ft() {
    return (
      x.setTimeout(function () {
        ht = void 0;
      }),
      (ht = Date.now())
    );
  }
  function gt(e, t) {
    var i,
      n = 0,
      s = { height: e };
    for (t = t ? 1 : 0; n < 4; n += 2 - t)
      s["margin" + (i = ie[n])] = s["padding" + i] = e;
    return (t && (s.opacity = s.width = e), s);
  }
  function mt(e, t, i) {
    for (
      var n,
        s = (vt.tweeners[t] || []).concat(vt.tweeners["*"]),
        o = 0,
        r = s.length;
      o < r;
      o++
    )
      if ((n = s[o].call(i, t, e))) return n;
  }
  function vt(s, e, t) {
    var i,
      o,
      n = 0,
      r = vt.prefilters.length,
      a = C.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (o) return !1;
        for (
          var e = ht || ft(),
            e = Math.max(0, h.startTime + h.duration - e),
            t = 1 - (e / h.duration || 0),
            i = 0,
            n = h.tweens.length;
          i < n;
          i++
        )
          h.tweens[i].run(t);
        return (
          a.notifyWith(s, [h, t, e]),
          t < 1 && n
            ? e
            : (n || a.notifyWith(s, [h, 1, 0]), a.resolveWith(s, [h]), !1)
        );
      },
      h = a.promise({
        elem: s,
        props: C.extend({}, e),
        opts: C.extend(!0, { specialEasing: {}, easing: C.easing._default }, t),
        originalProperties: e,
        originalOptions: t,
        startTime: ht || ft(),
        duration: t.duration,
        tweens: [],
        createTween: function (e, t) {
          e = C.Tween(
            s,
            h.opts,
            e,
            t,
            h.opts.specialEasing[e] || h.opts.easing,
          );
          return (h.tweens.push(e), e);
        },
        stop: function (e) {
          var t = 0,
            i = e ? h.tweens.length : 0;
          if (o) return this;
          for (o = !0; t < i; t++) h.tweens[t].run(1);
          return (
            e
              ? (a.notifyWith(s, [h, 1, 0]), a.resolveWith(s, [h, e]))
              : a.rejectWith(s, [h, e]),
            this
          );
        },
      }),
      c = h.props;
    for (
      (function (e, t) {
        var i, n, s, o, r;
        for (i in e)
          if (
            ((s = t[(n = V(i))]),
            (o = e[i]),
            Array.isArray(o) && ((s = o[1]), (o = e[i] = o[0])),
            i !== n && ((e[n] = o), delete e[i]),
            (r = C.cssHooks[n]) && ("expand" in r))
          )
            for (i in ((o = r.expand(o)), delete e[n], o))
              (i in e) || ((e[i] = o[i]), (t[i] = s));
          else t[n] = s;
      })(c, h.opts.specialEasing);
      n < r;
      n++
    )
      if ((i = vt.prefilters[n].call(h, s, c, h.opts)))
        return (
          g(i.stop) &&
            (C._queueHooks(h.elem, h.opts.queue).stop = i.stop.bind(i)),
          i
        );
    return (
      C.map(c, mt, h),
      g(h.opts.start) && h.opts.start.call(s, h),
      h
        .progress(h.opts.progress)
        .done(h.opts.done, h.opts.complete)
        .fail(h.opts.fail)
        .always(h.opts.always),
      C.fx.timer(C.extend(l, { elem: s, anim: h, queue: h.opts.queue })),
      h
    );
  }
  ((C.Animation = C.extend(vt, {
    tweeners: {
      "*": [
        function (e, t) {
          var i = this.createTween(e, t);
          return (ae(i.elem, e, te.exec(t), i), i);
        },
      ],
    },
    tweener: function (e, t) {
      for (
        var i, n = 0, s = (e = g(e) ? ((t = e), ["*"]) : e.match(N)).length;
        n < s;
        n++
      )
        ((i = e[n]),
          (vt.tweeners[i] = vt.tweeners[i] || []),
          vt.tweeners[i].unshift(t));
    },
    prefilters: [
      function (e, t, i) {
        var n,
          s,
          o,
          r,
          a,
          l,
          h,
          c = "width" in t || "height" in t,
          u = this,
          d = {},
          p = e.style,
          f = e.nodeType && re(e),
          g = Z.get(e, "fxshow");
        for (n in (i.queue ||
          (null == (r = C._queueHooks(e, "fx")).unqueued &&
            ((r.unqueued = 0),
            (a = r.empty.fire),
            (r.empty.fire = function () {
              r.unqueued || a();
            })),
          r.unqueued++,
          u.always(function () {
            u.always(function () {
              (r.unqueued--, C.queue(e, "fx").length || r.empty.fire());
            });
          })),
        t))
          if (((s = t[n]), ut.test(s))) {
            if (
              (delete t[n],
              (o = o || "toggle" === s),
              s === (f ? "hide" : "show"))
            ) {
              if ("show" !== s || !g || void 0 === g[n]) continue;
              f = !0;
            }
            d[n] = (g && g[n]) || C.style(e, n);
          }
        if ((l = !C.isEmptyObject(t)) || !C.isEmptyObject(d))
          for (n in (c &&
            1 === e.nodeType &&
            ((i.overflow = [p.overflow, p.overflowX, p.overflowY]),
            null == (h = g && g.display) && (h = Z.get(e, "display")),
            "none" === (c = C.css(e, "display")) &&
              (h
                ? (c = h)
                : (he([e], !0),
                  (h = e.style.display || h),
                  (c = C.css(e, "display")),
                  he([e]))),
            ("inline" === c || ("inline-block" === c && null != h)) &&
              "none" === C.css(e, "float") &&
              (l ||
                (u.done(function () {
                  p.display = h;
                }),
                null == h && ((c = p.display), (h = "none" === c ? "" : c))),
              (p.display = "inline-block"))),
          i.overflow &&
            ((p.overflow = "hidden"),
            u.always(function () {
              ((p.overflow = i.overflow[0]),
                (p.overflowX = i.overflow[1]),
                (p.overflowY = i.overflow[2]));
            })),
          (l = !1),
          d))
            (l ||
              (g
                ? "hidden" in g && (f = g.hidden)
                : (g = Z.access(e, "fxshow", { display: h })),
              o && (g.hidden = !f),
              f && he([e], !0),
              u.done(function () {
                for (n in (f || he([e]), Z.remove(e, "fxshow"), d))
                  C.style(e, n, d[n]);
              })),
              (l = mt(f ? g[n] : 0, n, u)),
              n in g ||
                ((g[n] = l.start), f && ((l.end = l.start), (l.start = 0))));
      },
    ],
    prefilter: function (e, t) {
      t ? vt.prefilters.unshift(e) : vt.prefilters.push(e);
    },
  })),
    (C.speed = function (e, t, i) {
      var n =
        e && "object" == typeof e
          ? C.extend({}, e)
          : {
              complete: i || (!i && t) || (g(e) && e),
              duration: e,
              easing: (i && t) || (t && !g(t) && t),
            };
      return (
        C.fx.off
          ? (n.duration = 0)
          : "number" != typeof n.duration &&
            (n.duration in C.fx.speeds
              ? (n.duration = C.fx.speeds[n.duration])
              : (n.duration = C.fx.speeds._default)),
        (null != n.queue && !0 !== n.queue) || (n.queue = "fx"),
        (n.old = n.complete),
        (n.complete = function () {
          (g(n.old) && n.old.call(this), n.queue && C.dequeue(this, n.queue));
        }),
        n
      );
    }),
    C.fn.extend({
      fadeTo: function (e, t, i, n) {
        return this.filter(re)
          .css("opacity", 0)
          .show()
          .end()
          .animate({ opacity: t }, e, i, n);
      },
      animate: function (t, e, i, n) {
        function s() {
          var e = vt(this, C.extend({}, t), r);
          (o || Z.get(this, "finish")) && e.stop(!0);
        }
        var o = C.isEmptyObject(t),
          r = C.speed(e, i, n);
        return (
          (s.finish = s),
          o || !1 === r.queue ? this.each(s) : this.queue(r.queue, s)
        );
      },
      stop: function (s, e, o) {
        function r(e) {
          var t = e.stop;
          (delete e.stop, t(o));
        }
        return (
          "string" != typeof s && ((o = e), (e = s), (s = void 0)),
          e && this.queue(s || "fx", []),
          this.each(function () {
            var e = !0,
              t = null != s && s + "queueHooks",
              i = C.timers,
              n = Z.get(this);
            if (t) n[t] && n[t].stop && r(n[t]);
            else for (t in n) n[t] && n[t].stop && dt.test(t) && r(n[t]);
            for (t = i.length; t--; )
              i[t].elem !== this ||
                (null != s && i[t].queue !== s) ||
                (i[t].anim.stop(o), (e = !1), i.splice(t, 1));
            (!e && o) || C.dequeue(this, s);
          })
        );
      },
      finish: function (r) {
        return (
          !1 !== r && (r = r || "fx"),
          this.each(function () {
            var e,
              t = Z.get(this),
              i = t[r + "queue"],
              n = t[r + "queueHooks"],
              s = C.timers,
              o = i ? i.length : 0;
            for (
              t.finish = !0,
                C.queue(this, r, []),
                n && n.stop && n.stop.call(this, !0),
                e = s.length;
              e--;

            )
              s[e].elem === this &&
                s[e].queue === r &&
                (s[e].anim.stop(!0), s.splice(e, 1));
            for (e = 0; e < o; e++)
              i[e] && i[e].finish && i[e].finish.call(this);
            delete t.finish;
          })
        );
      },
    }),
    C.each(["toggle", "show", "hide"], function (e, n) {
      var s = C.fn[n];
      C.fn[n] = function (e, t, i) {
        return null == e || "boolean" == typeof e
          ? s.apply(this, arguments)
          : this.animate(gt(n, !0), e, t, i);
      };
    }),
    C.each(
      {
        slideDown: gt("show"),
        slideUp: gt("hide"),
        slideToggle: gt("toggle"),
        fadeIn: { opacity: "show" },
        fadeOut: { opacity: "hide" },
        fadeToggle: { opacity: "toggle" },
      },
      function (e, n) {
        C.fn[e] = function (e, t, i) {
          return this.animate(n, e, t, i);
        };
      },
    ),
    (C.timers = []),
    (C.fx.tick = function () {
      var e,
        t = 0,
        i = C.timers;
      for (ht = Date.now(); t < i.length; t++)
        (e = i[t])() || i[t] !== e || i.splice(t--, 1);
      (i.length || C.fx.stop(), (ht = void 0));
    }),
    (C.fx.timer = function (e) {
      (C.timers.push(e), C.fx.start());
    }),
    (C.fx.interval = 13),
    (C.fx.start = function () {
      ct || ((ct = !0), pt());
    }),
    (C.fx.stop = function () {
      ct = null;
    }),
    (C.fx.speeds = { slow: 600, fast: 200, _default: 400 }),
    (C.fn.delay = function (n, e) {
      return (
        (n = (C.fx && C.fx.speeds[n]) || n),
        this.queue((e = e || "fx"), function (e, t) {
          var i = x.setTimeout(e, n);
          t.stop = function () {
            x.clearTimeout(i);
          };
        })
      );
    }),
    (u = P.createElement("input")),
    (ee = P.createElement("select").appendChild(P.createElement("option"))),
    (u.type = "checkbox"),
    (y.checkOn = "" !== u.value),
    (y.optSelected = ee.selected),
    ((u = P.createElement("input")).value = "t"),
    (u.type = "radio"),
    (y.radioValue = "t" === u.value));
  var bt,
    yt = C.expr.attrHandle;
  (C.fn.extend({
    attr: function (e, t) {
      return q(this, C.attr, e, t, 1 < arguments.length);
    },
    removeAttr: function (e) {
      return this.each(function () {
        C.removeAttr(this, e);
      });
    },
  }),
    C.extend({
      attr: function (e, t, i) {
        var n,
          s,
          o = e.nodeType;
        if (3 !== o && 8 !== o && 2 !== o)
          return void 0 === e.getAttribute
            ? C.prop(e, t, i)
            : ((1 === o && C.isXMLDoc(e)) ||
                (s =
                  C.attrHooks[t.toLowerCase()] ||
                  (C.expr.match.bool.test(t) ? bt : void 0)),
              void 0 !== i
                ? null === i
                  ? void C.removeAttr(e, t)
                  : s && "set" in s && void 0 !== (n = s.set(e, i, t))
                    ? n
                    : (e.setAttribute(t, i + ""), i)
                : !(s && "get" in s && null !== (n = s.get(e, t))) &&
                    null == (n = C.find.attr(e, t))
                  ? void 0
                  : n);
      },
      attrHooks: {
        type: {
          set: function (e, t) {
            if (!y.radioValue && "radio" === t && H(e, "input")) {
              var i = e.value;
              return (e.setAttribute("type", t), i && (e.value = i), t);
            }
          },
        },
      },
      removeAttr: function (e, t) {
        var i,
          n = 0,
          s = t && t.match(N);
        if (s && 1 === e.nodeType) for (; (i = s[n++]); ) e.removeAttribute(i);
      },
    }),
    (bt = {
      set: function (e, t, i) {
        return (!1 === t ? C.removeAttr(e, i) : e.setAttribute(i, i), i);
      },
    }),
    C.each(C.expr.match.bool.source.match(/\w+/g), function (e, t) {
      var r = yt[t] || C.find.attr;
      yt[t] = function (e, t, i) {
        var n,
          s,
          o = t.toLowerCase();
        return (
          i ||
            ((s = yt[o]),
            (yt[o] = n),
            (n = null != r(e, t, i) ? o : null),
            (yt[o] = s)),
          n
        );
      };
    }));
  var _t = /^(?:input|select|textarea|button)$/i,
    wt = /^(?:a|area)$/i;
  function xt(e) {
    return (e.match(N) || []).join(" ");
  }
  function Pt(e) {
    return (e.getAttribute && e.getAttribute("class")) || "";
  }
  function Ct(e) {
    return Array.isArray(e) ? e : ("string" == typeof e && e.match(N)) || [];
  }
  (C.fn.extend({
    prop: function (e, t) {
      return q(this, C.prop, e, t, 1 < arguments.length);
    },
    removeProp: function (e) {
      return this.each(function () {
        delete this[C.propFix[e] || e];
      });
    },
  }),
    C.extend({
      prop: function (e, t, i) {
        var n,
          s,
          o = e.nodeType;
        if (3 !== o && 8 !== o && 2 !== o)
          return (
            (1 === o && C.isXMLDoc(e)) ||
              ((t = C.propFix[t] || t), (s = C.propHooks[t])),
            void 0 !== i
              ? s && "set" in s && void 0 !== (n = s.set(e, i, t))
                ? n
                : (e[t] = i)
              : s && "get" in s && null !== (n = s.get(e, t))
                ? n
                : e[t]
          );
      },
      propHooks: {
        tabIndex: {
          get: function (e) {
            var t = C.find.attr(e, "tabindex");
            return t
              ? parseInt(t, 10)
              : _t.test(e.nodeName) || (wt.test(e.nodeName) && e.href)
                ? 0
                : -1;
          },
        },
      },
      propFix: { for: "htmlFor", class: "className" },
    }),
    y.optSelected ||
      (C.propHooks.selected = {
        get: function (e) {
          e = e.parentNode;
          return (e && e.parentNode && e.parentNode.selectedIndex, null);
        },
        set: function (e) {
          e = e.parentNode;
          e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex);
        },
      }),
    C.each(
      [
        "tabIndex",
        "readOnly",
        "maxLength",
        "cellSpacing",
        "cellPadding",
        "rowSpan",
        "colSpan",
        "useMap",
        "frameBorder",
        "contentEditable",
      ],
      function () {
        C.propFix[this.toLowerCase()] = this;
      },
    ),
    C.fn.extend({
      addClass: function (t) {
        var e,
          i,
          n,
          s,
          o,
          r,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            C(this).addClass(t.call(this, e, Pt(this)));
          });
        if ((e = Ct(t)).length)
          for (; (i = this[a++]); )
            if (((r = Pt(i)), (n = 1 === i.nodeType && " " + xt(r) + " "))) {
              for (o = 0; (s = e[o++]); )
                n.indexOf(" " + s + " ") < 0 && (n += s + " ");
              r !== (r = xt(n)) && i.setAttribute("class", r);
            }
        return this;
      },
      removeClass: function (t) {
        var e,
          i,
          n,
          s,
          o,
          r,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            C(this).removeClass(t.call(this, e, Pt(this)));
          });
        if (!arguments.length) return this.attr("class", "");
        if ((e = Ct(t)).length)
          for (; (i = this[a++]); )
            if (((r = Pt(i)), (n = 1 === i.nodeType && " " + xt(r) + " "))) {
              for (o = 0; (s = e[o++]); )
                for (; -1 < n.indexOf(" " + s + " "); )
                  n = n.replace(" " + s + " ", " ");
              r !== (r = xt(n)) && i.setAttribute("class", r);
            }
        return this;
      },
      toggleClass: function (s, t) {
        var o = typeof s,
          r = "string" == o || Array.isArray(s);
        return "boolean" == typeof t && r
          ? t
            ? this.addClass(s)
            : this.removeClass(s)
          : g(s)
            ? this.each(function (e) {
                C(this).toggleClass(s.call(this, e, Pt(this), t), t);
              })
            : this.each(function () {
                var e, t, i, n;
                if (r)
                  for (t = 0, i = C(this), n = Ct(s); (e = n[t++]); )
                    i.hasClass(e) ? i.removeClass(e) : i.addClass(e);
                else
                  (void 0 !== s && "boolean" != o) ||
                    ((e = Pt(this)) && Z.set(this, "__className__", e),
                    this.setAttribute &&
                      this.setAttribute(
                        "class",
                        (!e && !1 !== s && Z.get(this, "__className__")) || "",
                      ));
              });
      },
      hasClass: function (e) {
        for (var t, i = 0, n = " " + e + " "; (t = this[i++]); )
          if (1 === t.nodeType && -1 < (" " + xt(Pt(t)) + " ").indexOf(n))
            return !0;
        return !1;
      },
    }));
  var kt = /\r/g;
  (C.fn.extend({
    val: function (t) {
      var i,
        e,
        n,
        s = this[0];
      return arguments.length
        ? ((n = g(t)),
          this.each(function (e) {
            1 === this.nodeType &&
              (null == (e = n ? t.call(this, e, C(this).val()) : t)
                ? (e = "")
                : "number" == typeof e
                  ? (e += "")
                  : Array.isArray(e) &&
                    (e = C.map(e, function (e) {
                      return null == e ? "" : e + "";
                    })),
              ((i =
                C.valHooks[this.type] ||
                C.valHooks[this.nodeName.toLowerCase()]) &&
                "set" in i &&
                void 0 !== i.set(this, e, "value")) ||
                (this.value = e));
          }))
        : s
          ? (i = C.valHooks[s.type] || C.valHooks[s.nodeName.toLowerCase()]) &&
            "get" in i &&
            void 0 !== (e = i.get(s, "value"))
            ? e
            : "string" == typeof (e = s.value)
              ? e.replace(kt, "")
              : null == e
                ? ""
                : e
          : void 0;
    },
  }),
    C.extend({
      valHooks: {
        option: {
          get: function (e) {
            var t = C.find.attr(e, "value");
            return null != t ? t : xt(C.text(e));
          },
        },
        select: {
          get: function (e) {
            for (
              var t,
                i = e.options,
                n = e.selectedIndex,
                s = "select-one" === e.type,
                o = s ? null : [],
                r = s ? n + 1 : i.length,
                a = n < 0 ? r : s ? n : 0;
              a < r;
              a++
            )
              if (
                ((t = i[a]).selected || a === n) &&
                !t.disabled &&
                (!t.parentNode.disabled || !H(t.parentNode, "optgroup"))
              ) {
                if (((t = C(t).val()), s)) return t;
                o.push(t);
              }
            return o;
          },
          set: function (e, t) {
            for (
              var i, n, s = e.options, o = C.makeArray(t), r = s.length;
              r--;

            )
              ((n = s[r]).selected =
                -1 < C.inArray(C.valHooks.option.get(n), o)) && (i = !0);
            return (i || (e.selectedIndex = -1), o);
          },
        },
      },
    }),
    C.each(["radio", "checkbox"], function () {
      ((C.valHooks[this] = {
        set: function (e, t) {
          if (Array.isArray(t))
            return (e.checked = -1 < C.inArray(C(e).val(), t));
        },
      }),
        y.checkOn ||
          (C.valHooks[this].get = function (e) {
            return null === e.getAttribute("value") ? "on" : e.value;
          }));
    }),
    (y.focusin = "onfocusin" in x));
  function Tt(e) {
    e.stopPropagation();
  }
  var Ht = /^(?:focusinfocus|focusoutblur)$/;
  (C.extend(C.event, {
    trigger: function (e, t, i, n) {
      var s,
        o,
        r,
        a,
        l,
        h,
        c,
        u = [i || P],
        d = b.call(e, "type") ? e.type : e,
        p = b.call(e, "namespace") ? e.namespace.split(".") : [],
        f = (c = o = i = i || P);
      if (
        3 !== i.nodeType &&
        8 !== i.nodeType &&
        !Ht.test(d + C.event.triggered) &&
        (-1 < d.indexOf(".") && ((d = (p = d.split(".")).shift()), p.sort()),
        (a = d.indexOf(":") < 0 && "on" + d),
        ((e = e[C.expando]
          ? e
          : new C.Event(d, "object" == typeof e && e)).isTrigger = n ? 2 : 3),
        (e.namespace = p.join(".")),
        (e.rnamespace = e.namespace
          ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")
          : null),
        (e.result = void 0),
        e.target || (e.target = i),
        (t = null == t ? [e] : C.makeArray(t, [e])),
        (h = C.event.special[d] || {}),
        n || !h.trigger || !1 !== h.trigger.apply(i, t))
      ) {
        if (!n && !h.noBubble && !m(i)) {
          for (
            r = h.delegateType || d, Ht.test(r + d) || (f = f.parentNode);
            f;
            f = f.parentNode
          )
            (u.push(f), (o = f));
          o === (i.ownerDocument || P) &&
            u.push(o.defaultView || o.parentWindow || x);
        }
        for (s = 0; (f = u[s++]) && !e.isPropagationStopped(); )
          ((c = f),
            (e.type = 1 < s ? r : h.bindType || d),
            (l =
              (Z.get(f, "events") || Object.create(null))[e.type] &&
              Z.get(f, "handle")) && l.apply(f, t),
            (l = a && f[a]) &&
              l.apply &&
              Y(f) &&
              ((e.result = l.apply(f, t)),
              !1 === e.result && e.preventDefault()));
        return (
          (e.type = d),
          n ||
            e.isDefaultPrevented() ||
            (h._default && !1 !== h._default.apply(u.pop(), t)) ||
            !Y(i) ||
            (a &&
              g(i[d]) &&
              !m(i) &&
              ((o = i[a]) && (i[a] = null),
              (C.event.triggered = d),
              e.isPropagationStopped() && c.addEventListener(d, Tt),
              i[d](),
              e.isPropagationStopped() && c.removeEventListener(d, Tt),
              (C.event.triggered = void 0),
              o && (i[a] = o))),
          e.result
        );
      }
    },
    simulate: function (e, t, i) {
      e = C.extend(new C.Event(), i, { type: e, isSimulated: !0 });
      C.event.trigger(e, null, t);
    },
  }),
    C.fn.extend({
      trigger: function (e, t) {
        return this.each(function () {
          C.event.trigger(e, t, this);
        });
      },
      triggerHandler: function (e, t) {
        var i = this[0];
        if (i) return C.event.trigger(e, t, i, !0);
      },
    }),
    y.focusin ||
      C.each({ focus: "focusin", blur: "focusout" }, function (i, n) {
        function s(e) {
          C.event.simulate(n, e.target, C.event.fix(e));
        }
        C.event.special[n] = {
          setup: function () {
            var e = this.ownerDocument || this.document || this,
              t = Z.access(e, n);
            (t || e.addEventListener(i, s, !0), Z.access(e, n, (t || 0) + 1));
          },
          teardown: function () {
            var e = this.ownerDocument || this.document || this,
              t = Z.access(e, n) - 1;
            t
              ? Z.access(e, n, t)
              : (e.removeEventListener(i, s, !0), Z.remove(e, n));
          },
        };
      }));
  var Dt = x.location,
    It = { guid: Date.now() },
    St = /\?/;
  C.parseXML = function (e) {
    var t;
    if (!e || "string" != typeof e) return null;
    try {
      t = new x.DOMParser().parseFromString(e, "text/xml");
    } catch (e) {
      t = void 0;
    }
    return (
      (t && !t.getElementsByTagName("parsererror").length) ||
        C.error("Invalid XML: " + e),
      t
    );
  };
  var Et = /\[\]$/,
    At = /\r?\n/g,
    Mt = /^(?:submit|button|image|reset|file)$/i,
    Ot = /^(?:input|select|textarea|keygen)/i;
  ((C.param = function (e, t) {
    function i(e, t) {
      ((t = g(t) ? t() : t),
        (s[s.length] =
          encodeURIComponent(e) +
          "=" +
          encodeURIComponent(null == t ? "" : t)));
    }
    var n,
      s = [];
    if (null == e) return "";
    if (Array.isArray(e) || (e.jquery && !C.isPlainObject(e)))
      C.each(e, function () {
        i(this.name, this.value);
      });
    else
      for (n in e)
        !(function i(n, e, s, o) {
          if (Array.isArray(e))
            C.each(e, function (e, t) {
              s || Et.test(n)
                ? o(n, t)
                : i(
                    n +
                      "[" +
                      ("object" == typeof t && null != t ? e : "") +
                      "]",
                    t,
                    s,
                    o,
                  );
            });
          else if (s || "object" !== f(e)) o(n, e);
          else for (var t in e) i(n + "[" + t + "]", e[t], s, o);
        })(n, e[n], t, i);
    return s.join("&");
  }),
    C.fn.extend({
      serialize: function () {
        return C.param(this.serializeArray());
      },
      serializeArray: function () {
        return this.map(function () {
          var e = C.prop(this, "elements");
          return e ? C.makeArray(e) : this;
        })
          .filter(function () {
            var e = this.type;
            return (
              this.name &&
              !C(this).is(":disabled") &&
              Ot.test(this.nodeName) &&
              !Mt.test(e) &&
              (this.checked || !ce.test(e))
            );
          })
          .map(function (e, t) {
            var i = C(this).val();
            return null == i
              ? null
              : Array.isArray(i)
                ? C.map(i, function (e) {
                    return { name: t.name, value: e.replace(At, "\r\n") };
                  })
                : { name: t.name, value: i.replace(At, "\r\n") };
          })
          .get();
      },
    }));
  var Nt = /%20/g,
    Lt = /#.*$/,
    zt = /([?&])_=[^&]*/,
    jt = /^(.*?):[ \t]*([^\r\n]*)$/gm,
    Ft = /^(?:GET|HEAD)$/,
    Rt = /^\/\//,
    $t = {},
    qt = {},
    Wt = "*/".concat("*"),
    Bt = P.createElement("a");
  function Ut(o) {
    return function (e, t) {
      "string" != typeof e && ((t = e), (e = "*"));
      var i,
        n = 0,
        s = e.toLowerCase().match(N) || [];
      if (g(t))
        for (; (i = s[n++]); )
          "+" === i[0]
            ? ((i = i.slice(1) || "*"), (o[i] = o[i] || []).unshift(t))
            : (o[i] = o[i] || []).push(t);
    };
  }
  function Vt(t, n, s, o) {
    var r = {},
      a = t === qt;
    function l(e) {
      var i;
      return (
        (r[e] = !0),
        C.each(t[e] || [], function (e, t) {
          t = t(n, s, o);
          return "string" != typeof t || a || r[t]
            ? a
              ? !(i = t)
              : void 0
            : (n.dataTypes.unshift(t), l(t), !1);
        }),
        i
      );
    }
    return l(n.dataTypes[0]) || (!r["*"] && l("*"));
  }
  function Yt(e, t) {
    var i,
      n,
      s = C.ajaxSettings.flatOptions || {};
    for (i in t) void 0 !== t[i] && ((s[i] ? e : (n = n || {}))[i] = t[i]);
    return (n && C.extend(!0, e, n), e);
  }
  ((Bt.href = Dt.href),
    C.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: Dt.href,
        type: "GET",
        isLocal:
          /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
            Dt.protocol,
          ),
        global: !0,
        processData: !0,
        async: !0,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        accepts: {
          "*": Wt,
          text: "text/plain",
          html: "text/html",
          xml: "application/xml, text/xml",
          json: "application/json, text/javascript",
        },
        contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ },
        responseFields: {
          xml: "responseXML",
          text: "responseText",
          json: "responseJSON",
        },
        converters: {
          "* text": String,
          "text html": !0,
          "text json": JSON.parse,
          "text xml": C.parseXML,
        },
        flatOptions: { url: !0, context: !0 },
      },
      ajaxSetup: function (e, t) {
        return t ? Yt(Yt(e, C.ajaxSettings), t) : Yt(C.ajaxSettings, e);
      },
      ajaxPrefilter: Ut($t),
      ajaxTransport: Ut(qt),
      ajax: function (e, t) {
        "object" == typeof e && ((t = e), (e = void 0));
        var l,
          h,
          c,
          i,
          u,
          d,
          p,
          n,
          s,
          f = C.ajaxSetup({}, (t = t || {})),
          g = f.context || f,
          m = f.context && (g.nodeType || g.jquery) ? C(g) : C.event,
          v = C.Deferred(),
          b = C.Callbacks("once memory"),
          y = f.statusCode || {},
          o = {},
          r = {},
          a = "canceled",
          _ = {
            readyState: 0,
            getResponseHeader: function (e) {
              var t;
              if (d) {
                if (!i)
                  for (i = {}; (t = jt.exec(c)); )
                    i[t[1].toLowerCase() + " "] = (
                      i[t[1].toLowerCase() + " "] || []
                    ).concat(t[2]);
                t = i[e.toLowerCase() + " "];
              }
              return null == t ? null : t.join(", ");
            },
            getAllResponseHeaders: function () {
              return d ? c : null;
            },
            setRequestHeader: function (e, t) {
              return (
                null == d &&
                  ((e = r[e.toLowerCase()] = r[e.toLowerCase()] || e),
                  (o[e] = t)),
                this
              );
            },
            overrideMimeType: function (e) {
              return (null == d && (f.mimeType = e), this);
            },
            statusCode: function (e) {
              if (e)
                if (d) _.always(e[_.status]);
                else for (var t in e) y[t] = [y[t], e[t]];
              return this;
            },
            abort: function (e) {
              e = e || a;
              return (l && l.abort(e), w(0, e), this);
            },
          };
        if (
          (v.promise(_),
          (f.url = ((e || f.url || Dt.href) + "").replace(
            Rt,
            Dt.protocol + "//",
          )),
          (f.type = t.method || t.type || f.method || f.type),
          (f.dataTypes = (f.dataType || "*").toLowerCase().match(N) || [""]),
          null == f.crossDomain)
        ) {
          s = P.createElement("a");
          try {
            ((s.href = f.url),
              (s.href = s.href),
              (f.crossDomain =
                Bt.protocol + "//" + Bt.host != s.protocol + "//" + s.host));
          } catch (e) {
            f.crossDomain = !0;
          }
        }
        if (
          (f.data &&
            f.processData &&
            "string" != typeof f.data &&
            (f.data = C.param(f.data, f.traditional)),
          Vt($t, f, t, _),
          d)
        )
          return _;
        for (n in ((p = C.event && f.global) &&
          0 == C.active++ &&
          C.event.trigger("ajaxStart"),
        (f.type = f.type.toUpperCase()),
        (f.hasContent = !Ft.test(f.type)),
        (h = f.url.replace(Lt, "")),
        f.hasContent
          ? f.data &&
            f.processData &&
            0 ===
              (f.contentType || "").indexOf(
                "application/x-www-form-urlencoded",
              ) &&
            (f.data = f.data.replace(Nt, "+"))
          : ((s = f.url.slice(h.length)),
            f.data &&
              (f.processData || "string" == typeof f.data) &&
              ((h += (St.test(h) ? "&" : "?") + f.data), delete f.data),
            !1 === f.cache &&
              ((h = h.replace(zt, "$1")),
              (s = (St.test(h) ? "&" : "?") + "_=" + It.guid++ + s)),
            (f.url = h + s)),
        f.ifModified &&
          (C.lastModified[h] &&
            _.setRequestHeader("If-Modified-Since", C.lastModified[h]),
          C.etag[h] && _.setRequestHeader("If-None-Match", C.etag[h])),
        ((f.data && f.hasContent && !1 !== f.contentType) || t.contentType) &&
          _.setRequestHeader("Content-Type", f.contentType),
        _.setRequestHeader(
          "Accept",
          f.dataTypes[0] && f.accepts[f.dataTypes[0]]
            ? f.accepts[f.dataTypes[0]] +
                ("*" !== f.dataTypes[0] ? ", " + Wt + "; q=0.01" : "")
            : f.accepts["*"],
        ),
        f.headers))
          _.setRequestHeader(n, f.headers[n]);
        if (f.beforeSend && (!1 === f.beforeSend.call(g, _, f) || d))
          return _.abort();
        if (
          ((a = "abort"),
          b.add(f.complete),
          _.done(f.success),
          _.fail(f.error),
          (l = Vt(qt, f, t, _)))
        ) {
          if (((_.readyState = 1), p && m.trigger("ajaxSend", [_, f]), d))
            return _;
          f.async &&
            0 < f.timeout &&
            (u = x.setTimeout(function () {
              _.abort("timeout");
            }, f.timeout));
          try {
            ((d = !1), l.send(o, w));
          } catch (e) {
            if (d) throw e;
            w(-1, e);
          }
        } else w(-1, "No Transport");
        function w(e, t, i, n) {
          var s,
            o,
            r,
            a = t;
          d ||
            ((d = !0),
            u && x.clearTimeout(u),
            (l = void 0),
            (c = n || ""),
            (_.readyState = 0 < e ? 4 : 0),
            (n = (200 <= e && e < 300) || 304 === e),
            i &&
              (r = (function (e, t, i) {
                for (
                  var n, s, o, r, a = e.contents, l = e.dataTypes;
                  "*" === l[0];

                )
                  (l.shift(),
                    void 0 === n &&
                      (n = e.mimeType || t.getResponseHeader("Content-Type")));
                if (n)
                  for (s in a)
                    if (a[s] && a[s].test(n)) {
                      l.unshift(s);
                      break;
                    }
                if (l[0] in i) o = l[0];
                else {
                  for (s in i) {
                    if (!l[0] || e.converters[s + " " + l[0]]) {
                      o = s;
                      break;
                    }
                    r = r || s;
                  }
                  o = o || r;
                }
                if (o) return (o !== l[0] && l.unshift(o), i[o]);
              })(f, _, i)),
            !n &&
              -1 < C.inArray("script", f.dataTypes) &&
              (f.converters["text script"] = function () {}),
            (r = (function (e, t, i, n) {
              var s,
                o,
                r,
                a,
                l,
                h = {},
                c = e.dataTypes.slice();
              if (c[1])
                for (r in e.converters) h[r.toLowerCase()] = e.converters[r];
              for (o = c.shift(); o; )
                if (
                  (e.responseFields[o] && (i[e.responseFields[o]] = t),
                  !l && n && e.dataFilter && (t = e.dataFilter(t, e.dataType)),
                  (l = o),
                  (o = c.shift()))
                )
                  if ("*" === o) o = l;
                  else if ("*" !== l && l !== o) {
                    if (!(r = h[l + " " + o] || h["* " + o]))
                      for (s in h)
                        if (
                          (a = s.split(" "))[1] === o &&
                          (r = h[l + " " + a[0]] || h["* " + a[0]])
                        ) {
                          !0 === r
                            ? (r = h[s])
                            : !0 !== h[s] && ((o = a[0]), c.unshift(a[1]));
                          break;
                        }
                    if (!0 !== r)
                      if (r && e.throws) t = r(t);
                      else
                        try {
                          t = r(t);
                        } catch (e) {
                          return {
                            state: "parsererror",
                            error: r
                              ? e
                              : "No conversion from " + l + " to " + o,
                          };
                        }
                  }
              return { state: "success", data: t };
            })(f, r, _, n)),
            n
              ? (f.ifModified &&
                  ((i = _.getResponseHeader("Last-Modified")) &&
                    (C.lastModified[h] = i),
                  (i = _.getResponseHeader("etag")) && (C.etag[h] = i)),
                204 === e || "HEAD" === f.type
                  ? (a = "nocontent")
                  : 304 === e
                    ? (a = "notmodified")
                    : ((a = r.state), (s = r.data), (n = !(o = r.error))))
              : ((o = a), (!e && a) || ((a = "error"), e < 0 && (e = 0))),
            (_.status = e),
            (_.statusText = (t || a) + ""),
            n ? v.resolveWith(g, [s, a, _]) : v.rejectWith(g, [_, a, o]),
            _.statusCode(y),
            (y = void 0),
            p && m.trigger(n ? "ajaxSuccess" : "ajaxError", [_, f, n ? s : o]),
            b.fireWith(g, [_, a]),
            p &&
              (m.trigger("ajaxComplete", [_, f]),
              --C.active || C.event.trigger("ajaxStop")));
        }
        return _;
      },
      getJSON: function (e, t, i) {
        return C.get(e, t, i, "json");
      },
      getScript: function (e, t) {
        return C.get(e, void 0, t, "script");
      },
    }),
    C.each(["get", "post"], function (e, s) {
      C[s] = function (e, t, i, n) {
        return (
          g(t) && ((n = n || i), (i = t), (t = void 0)),
          C.ajax(
            C.extend(
              { url: e, type: s, dataType: n, data: t, success: i },
              C.isPlainObject(e) && e,
            ),
          )
        );
      };
    }),
    C.ajaxPrefilter(function (e) {
      for (var t in e.headers)
        "content-type" === t.toLowerCase() &&
          (e.contentType = e.headers[t] || "");
    }),
    (C._evalUrl = function (e, t, i) {
      return C.ajax({
        url: e,
        type: "GET",
        dataType: "script",
        cache: !0,
        async: !1,
        global: !1,
        converters: { "text script": function () {} },
        dataFilter: function (e) {
          C.globalEval(e, t, i);
        },
      });
    }),
    C.fn.extend({
      wrapAll: function (e) {
        return (
          this[0] &&
            (g(e) && (e = e.call(this[0])),
            (e = C(e, this[0].ownerDocument).eq(0).clone(!0)),
            this[0].parentNode && e.insertBefore(this[0]),
            e
              .map(function () {
                for (var e = this; e.firstElementChild; )
                  e = e.firstElementChild;
                return e;
              })
              .append(this)),
          this
        );
      },
      wrapInner: function (i) {
        return g(i)
          ? this.each(function (e) {
              C(this).wrapInner(i.call(this, e));
            })
          : this.each(function () {
              var e = C(this),
                t = e.contents();
              t.length ? t.wrapAll(i) : e.append(i);
            });
      },
      wrap: function (t) {
        var i = g(t);
        return this.each(function (e) {
          C(this).wrapAll(i ? t.call(this, e) : t);
        });
      },
      unwrap: function (e) {
        return (
          this.parent(e)
            .not("body")
            .each(function () {
              C(this).replaceWith(this.childNodes);
            }),
          this
        );
      },
    }),
    (C.expr.pseudos.hidden = function (e) {
      return !C.expr.pseudos.visible(e);
    }),
    (C.expr.pseudos.visible = function (e) {
      return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
    }),
    (C.ajaxSettings.xhr = function () {
      try {
        return new x.XMLHttpRequest();
      } catch (e) {}
    }));
  var Qt = { 0: 200, 1223: 204 },
    Zt = C.ajaxSettings.xhr();
  ((y.cors = !!Zt && "withCredentials" in Zt),
    (y.ajax = Zt = !!Zt),
    C.ajaxTransport(function (s) {
      var o, r;
      if (y.cors || (Zt && !s.crossDomain))
        return {
          send: function (e, t) {
            var i,
              n = s.xhr();
            if (
              (n.open(s.type, s.url, s.async, s.username, s.password),
              s.xhrFields)
            )
              for (i in s.xhrFields) n[i] = s.xhrFields[i];
            for (i in (s.mimeType &&
              n.overrideMimeType &&
              n.overrideMimeType(s.mimeType),
            s.crossDomain ||
              e["X-Requested-With"] ||
              (e["X-Requested-With"] = "XMLHttpRequest"),
            e))
              n.setRequestHeader(i, e[i]);
            ((o = function (e) {
              return function () {
                o &&
                  ((o =
                    r =
                    n.onload =
                    n.onerror =
                    n.onabort =
                    n.ontimeout =
                    n.onreadystatechange =
                      null),
                  "abort" === e
                    ? n.abort()
                    : "error" === e
                      ? "number" != typeof n.status
                        ? t(0, "error")
                        : t(n.status, n.statusText)
                      : t(
                          Qt[n.status] || n.status,
                          n.statusText,
                          "text" !== (n.responseType || "text") ||
                            "string" != typeof n.responseText
                            ? { binary: n.response }
                            : { text: n.responseText },
                          n.getAllResponseHeaders(),
                        ));
              };
            }),
              (n.onload = o()),
              (r = n.onerror = n.ontimeout = o("error")),
              void 0 !== n.onabort
                ? (n.onabort = r)
                : (n.onreadystatechange = function () {
                    4 === n.readyState &&
                      x.setTimeout(function () {
                        o && r();
                      });
                  }),
              (o = o("abort")));
            try {
              n.send((s.hasContent && s.data) || null);
            } catch (e) {
              if (o) throw e;
            }
          },
          abort: function () {
            o && o();
          },
        };
    }),
    C.ajaxPrefilter(function (e) {
      e.crossDomain && (e.contents.script = !1);
    }),
    C.ajaxSetup({
      accepts: {
        script:
          "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",
      },
      contents: { script: /\b(?:java|ecma)script\b/ },
      converters: {
        "text script": function (e) {
          return (C.globalEval(e), e);
        },
      },
    }),
    C.ajaxPrefilter("script", function (e) {
      (void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET"));
    }),
    C.ajaxTransport("script", function (i) {
      var n, s;
      if (i.crossDomain || i.scriptAttrs)
        return {
          send: function (e, t) {
            ((n = C("<script>")
              .attr(i.scriptAttrs || {})
              .prop({ charset: i.scriptCharset, src: i.url })
              .on(
                "load error",
                (s = function (e) {
                  (n.remove(),
                    (s = null),
                    e && t("error" === e.type ? 404 : 200, e.type));
                }),
              )),
              P.head.appendChild(n[0]));
          },
          abort: function () {
            s && s();
          },
        };
    }));
  var Xt = [],
    Kt = /(=)\?(?=&|$)|\?\?/;
  (C.ajaxSetup({
    jsonp: "callback",
    jsonpCallback: function () {
      var e = Xt.pop() || C.expando + "_" + It.guid++;
      return ((this[e] = !0), e);
    },
  }),
    C.ajaxPrefilter("json jsonp", function (e, t, i) {
      var n,
        s,
        o,
        r =
          !1 !== e.jsonp &&
          (Kt.test(e.url)
            ? "url"
            : "string" == typeof e.data &&
              0 ===
                (e.contentType || "").indexOf(
                  "application/x-www-form-urlencoded",
                ) &&
              Kt.test(e.data) &&
              "data");
      if (r || "jsonp" === e.dataTypes[0])
        return (
          (n = e.jsonpCallback =
            g(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback),
          r
            ? (e[r] = e[r].replace(Kt, "$1" + n))
            : !1 !== e.jsonp &&
              (e.url += (St.test(e.url) ? "&" : "?") + e.jsonp + "=" + n),
          (e.converters["script json"] = function () {
            return (o || C.error(n + " was not called"), o[0]);
          }),
          (e.dataTypes[0] = "json"),
          (s = x[n]),
          (x[n] = function () {
            o = arguments;
          }),
          i.always(function () {
            (void 0 === s ? C(x).removeProp(n) : (x[n] = s),
              e[n] && ((e.jsonpCallback = t.jsonpCallback), Xt.push(n)),
              o && g(s) && s(o[0]),
              (o = s = void 0));
          }),
          "script"
        );
    }),
    (y.createHTMLDocument =
      (((u = P.implementation.createHTMLDocument("").body).innerHTML =
        "<form></form><form></form>"),
      2 === u.childNodes.length)),
    (C.parseHTML = function (e, t, i) {
      return "string" != typeof e
        ? []
        : ("boolean" == typeof t && ((i = t), (t = !1)),
          t ||
            (y.createHTMLDocument
              ? (((n = (t =
                  P.implementation.createHTMLDocument("")).createElement(
                  "base",
                )).href = P.location.href),
                t.head.appendChild(n))
              : (t = P)),
          (n = !i && []),
          (i = D.exec(e))
            ? [t.createElement(i[1])]
            : ((i = ve([e], t, n)),
              n && n.length && C(n).remove(),
              C.merge([], i.childNodes)));
      var n;
    }),
    (C.fn.load = function (e, t, i) {
      var n,
        s,
        o,
        r = this,
        a = e.indexOf(" ");
      return (
        -1 < a && ((n = xt(e.slice(a))), (e = e.slice(0, a))),
        g(t)
          ? ((i = t), (t = void 0))
          : t && "object" == typeof t && (s = "POST"),
        0 < r.length &&
          C.ajax({ url: e, type: s || "GET", dataType: "html", data: t })
            .done(function (e) {
              ((o = arguments),
                r.html(n ? C("<div>").append(C.parseHTML(e)).find(n) : e));
            })
            .always(
              i &&
                function (e, t) {
                  r.each(function () {
                    i.apply(this, o || [e.responseText, t, e]);
                  });
                },
            ),
        this
      );
    }),
    (C.expr.pseudos.animated = function (t) {
      return C.grep(C.timers, function (e) {
        return t === e.elem;
      }).length;
    }),
    (C.offset = {
      setOffset: function (e, t, i) {
        var n,
          s,
          o,
          r,
          a = C.css(e, "position"),
          l = C(e),
          h = {};
        ("static" === a && (e.style.position = "relative"),
          (o = l.offset()),
          (n = C.css(e, "top")),
          (r = C.css(e, "left")),
          (r =
            ("absolute" === a || "fixed" === a) && -1 < (n + r).indexOf("auto")
              ? ((s = (a = l.position()).top), a.left)
              : ((s = parseFloat(n) || 0), parseFloat(r) || 0)),
          null != (t = g(t) ? t.call(e, i, C.extend({}, o)) : t).top &&
            (h.top = t.top - o.top + s),
          null != t.left && (h.left = t.left - o.left + r),
          "using" in t
            ? t.using.call(e, h)
            : ("number" == typeof h.top && (h.top += "px"),
              "number" == typeof h.left && (h.left += "px"),
              l.css(h)));
      },
    }),
    C.fn.extend({
      offset: function (t) {
        if (arguments.length)
          return void 0 === t
            ? this
            : this.each(function (e) {
                C.offset.setOffset(this, t, e);
              });
        var e,
          i = this[0];
        return i
          ? i.getClientRects().length
            ? ((e = i.getBoundingClientRect()),
              (i = i.ownerDocument.defaultView),
              { top: e.top + i.pageYOffset, left: e.left + i.pageXOffset })
            : { top: 0, left: 0 }
          : void 0;
      },
      position: function () {
        if (this[0]) {
          var e,
            t,
            i,
            n = this[0],
            s = { top: 0, left: 0 };
          if ("fixed" === C.css(n, "position")) t = n.getBoundingClientRect();
          else {
            for (
              t = this.offset(),
                i = n.ownerDocument,
                e = n.offsetParent || i.documentElement;
              e &&
              (e === i.body || e === i.documentElement) &&
              "static" === C.css(e, "position");

            )
              e = e.parentNode;
            e &&
              e !== n &&
              1 === e.nodeType &&
              (((s = C(e).offset()).top += C.css(e, "borderTopWidth", !0)),
              (s.left += C.css(e, "borderLeftWidth", !0)));
          }
          return {
            top: t.top - s.top - C.css(n, "marginTop", !0),
            left: t.left - s.left - C.css(n, "marginLeft", !0),
          };
        }
      },
      offsetParent: function () {
        return this.map(function () {
          for (
            var e = this.offsetParent;
            e && "static" === C.css(e, "position");

          )
            e = e.offsetParent;
          return e || ne;
        });
      },
    }),
    C.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (t, s) {
        var o = "pageYOffset" === s;
        C.fn[t] = function (e) {
          return q(
            this,
            function (e, t, i) {
              var n;
              return (
                m(e) ? (n = e) : 9 === e.nodeType && (n = e.defaultView),
                void 0 === i
                  ? n
                    ? n[s]
                    : e[t]
                  : void (n
                      ? n.scrollTo(o ? n.pageXOffset : i, o ? i : n.pageYOffset)
                      : (e[t] = i))
              );
            },
            t,
            e,
            arguments.length,
          );
        };
      },
    ),
    C.each(["top", "left"], function (e, i) {
      C.cssHooks[i] = Qe(y.pixelPosition, function (e, t) {
        if (t)
          return ((t = Ye(e, i)), Ue.test(t) ? C(e).position()[i] + "px" : t);
      });
    }),
    C.each({ Height: "height", Width: "width" }, function (r, a) {
      C.each(
        { padding: "inner" + r, content: a, "": "outer" + r },
        function (n, o) {
          C.fn[o] = function (e, t) {
            var i = arguments.length && (n || "boolean" != typeof e),
              s = n || (!0 === e || !0 === t ? "margin" : "border");
            return q(
              this,
              function (e, t, i) {
                var n;
                return m(e)
                  ? 0 === o.indexOf("outer")
                    ? e["inner" + r]
                    : e.document.documentElement["client" + r]
                  : 9 === e.nodeType
                    ? ((n = e.documentElement),
                      Math.max(
                        e.body["scroll" + r],
                        n["scroll" + r],
                        e.body["offset" + r],
                        n["offset" + r],
                        n["client" + r],
                      ))
                    : void 0 === i
                      ? C.css(e, t, s)
                      : C.style(e, t, i, s);
              },
              a,
              i ? e : void 0,
              i,
            );
          };
        },
      );
    }),
    C.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (e, t) {
        C.fn[t] = function (e) {
          return this.on(t, e);
        };
      },
    ),
    C.fn.extend({
      bind: function (e, t, i) {
        return this.on(e, null, t, i);
      },
      unbind: function (e, t) {
        return this.off(e, null, t);
      },
      delegate: function (e, t, i, n) {
        return this.on(t, e, i, n);
      },
      undelegate: function (e, t, i) {
        return 1 === arguments.length
          ? this.off(e, "**")
          : this.off(t, e || "**", i);
      },
      hover: function (e, t) {
        return this.mouseenter(e).mouseleave(t || e);
      },
    }),
    C.each(
      "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(
        " ",
      ),
      function (e, i) {
        C.fn[i] = function (e, t) {
          return 0 < arguments.length
            ? this.on(i, null, e, t)
            : this.trigger(i);
        };
      },
    ));
  var Gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  ((C.proxy = function (e, t) {
    var i, n;
    if (("string" == typeof t && ((n = e[t]), (t = e), (e = n)), g(e)))
      return (
        (i = a.call(arguments, 2)),
        ((n = function () {
          return e.apply(t || this, i.concat(a.call(arguments)));
        }).guid = e.guid =
          e.guid || C.guid++),
        n
      );
  }),
    (C.holdReady = function (e) {
      e ? C.readyWait++ : C.ready(!0);
    }),
    (C.isArray = Array.isArray),
    (C.parseJSON = JSON.parse),
    (C.nodeName = H),
    (C.isFunction = g),
    (C.isWindow = m),
    (C.camelCase = V),
    (C.type = f),
    (C.now = Date.now),
    (C.isNumeric = function (e) {
      var t = C.type(e);
      return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e));
    }),
    (C.trim = function (e) {
      return null == e ? "" : (e + "").replace(Gt, "");
    }),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return C;
      }));
  var Jt = x.jQuery,
    ei = x.$;
  return (
    (C.noConflict = function (e) {
      return (
        x.$ === C && (x.$ = ei),
        e && x.jQuery === C && (x.jQuery = Jt),
        C
      );
    }),
    void 0 === e && (x.jQuery = x.$ = C),
    C
  );
});
var H5P = (window.H5P = window.H5P || {});
((H5P.jQuery = jQuery.noConflict(!0)),
  (H5P.jQuery.fn.__originalLoad = H5P.jQuery.load),
  (H5P.jQuery.fn.load = function (e, t, i) {
    if ("function" != typeof e)
      return H5P.jQuery.fn.__originalLoad.apply(this, arguments);
    {
      console.warn("You are using a deprecated H5P library. Please upgrade!");
      let e = Array.prototype.slice.call(arguments);
      return (e.unshift("load"), H5P.jQuery.fn.on.apply(this, e));
    }
  }),
  ((H5P = window.H5P = window.H5P || {}).isFramed =
    window.self !== window.parent),
  (H5P.$window = H5P.jQuery(window)),
  (H5P.instances = []),
  document.documentElement.requestFullScreen
    ? (H5P.fullScreenBrowserPrefix = "")
    : document.documentElement.webkitRequestFullScreen
      ? ((H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i)),
        (H5P.safariBrowser =
          null === H5P.safariBrowser ? 0 : parseInt(H5P.safariBrowser[1])),
        (0 === H5P.safariBrowser || 6 < H5P.safariBrowser) &&
          (H5P.fullScreenBrowserPrefix = "webkit"))
      : document.documentElement.mozRequestFullScreen
        ? (H5P.fullScreenBrowserPrefix = "moz")
        : document.documentElement.msRequestFullscreen &&
          (H5P.fullScreenBrowserPrefix = "ms"),
  (H5P.opened = {}),
  (H5P.init = function (e) {
    (void 0 === H5P.$body && (H5P.$body = H5P.jQuery(document.body)),
      void 0 === H5P.fullscreenSupported &&
        (H5P.fullscreenSupported = !(
          H5PIntegration.fullscreenDisabled ||
          H5P.fullscreenDisabled ||
          (H5P.isFramed &&
            !1 !== H5P.externalEmbed &&
            !(
              document.fullscreenEnabled ||
              document.webkitFullscreenEnabled ||
              document.mozFullScreenEnabled
            ))
        )),
      void 0 === H5P.canHasFullScreen &&
        (H5P.canHasFullScreen = H5P.fullscreenSupported),
      H5P.jQuery(".h5p-content:not(.h5p-initialized)", e).each(function () {
        var t = H5P.jQuery(this).addClass("h5p-initialized"),
          i = H5P.jQuery('<div class="h5p-container"></div>').appendTo(t),
          s = t.data("content-id"),
          o = H5PIntegration.contents["cid-" + s];
        if (void 0 === o)
          return H5P.error(
            "No data for content id " + s + ". Perhaps the library is gone?",
          );
        var r = {
          library: o.library,
          params: JSON.parse(o.jsonContent),
          metadata: o.metadata,
        };
        H5P.getUserData(s, "state", function (e, t) {
          var n;
          t
            ? (r.userDatas = { state: t })
            : null === t &&
              H5PIntegration.saveFreq &&
              (delete o.contentUserData,
              (n = new H5P.Dialog(
                "content-user-data-reset",
                "Data Reset",
                "<p>" +
                  H5P.t("contentChanged") +
                  "</p><p>" +
                  H5P.t("startingOver") +
                  '</p><div class="h5p-dialog-ok-button" tabIndex="0" role="button">OK</div>',
                i,
              )),
              H5P.jQuery(n)
                .on("dialog-opened", function (e, t) {
                  function i(e) {
                    ("click" !== e.type && 32 !== e.which) ||
                      (n.close(), H5P.deleteUserData(s, "state", 0));
                  }
                  (t.find(".h5p-dialog-ok-button").click(i).keypress(i),
                    H5P.trigger(a, "resize"));
                })
                .on("dialog-closed", function () {
                  H5P.trigger(a, "resize");
                }),
              n.open());
        });
        var a = H5P.newRunnable(r, s, i, !0, { standalone: !0 });
        ((H5P.offlineRequestQueue = new H5P.OfflineRequestQueue({
          instance: a,
        })),
          1 == o.fullScreen &&
            H5P.fullscreenSupported &&
            H5P.jQuery(
              '<div class="h5p-content-controls"><div role="button" tabindex="0" class="h5p-enable-fullscreen" aria-label="' +
                H5P.t("fullscreen") +
                '" title="' +
                H5P.t("fullscreen") +
                '"></div></div>',
            )
              .prependTo(i)
              .children()
              .click(function () {
                H5P.fullScreen(i, a);
              })
              .keydown(function (e) {
                if (32 === e.which || 13 === e.which)
                  return (H5P.fullScreen(i, a), !1);
              }));
        var e,
          n,
          l,
          h,
          c,
          u,
          d,
          p = o.displayOptions,
          f = !1;
        (p.frame &&
          (p.copyright &&
            ((e = H5P.getCopyrights(a, r.params, s, r.metadata)) ||
              (p.copyright = !1)),
          (p = new H5P.ActionBar(p)),
          (n = p.getDOMElement()),
          p.on("reuse", function () {
            (H5P.openReuseDialog(n, o, r, a, s),
              a.triggerXAPI("accessed-reuse"));
          }),
          p.on("copyrights", function () {
            (new H5P.Dialog(
              "copyrights",
              H5P.t("copyrightInformation"),
              e,
              i,
            ).open(!0),
              a.triggerXAPI("accessed-copyright"));
          }),
          p.on("embed", function () {
            (H5P.openEmbedDialog(
              n,
              o.embedCode,
              o.resizeCode,
              { width: t.width(), height: t.height() },
              a,
            ),
              a.triggerXAPI("accessed-embed"));
          }),
          p.hasActions() && ((f = !0), n.insertAfter(i))),
          t.addClass(f ? "h5p-frame" : "h5p-no-frame"),
          (H5P.opened[s] = new Date()),
          H5P.on(a, "finish", function (e) {
            void 0 !== e.data &&
              H5P.setFinished(s, e.data.score, e.data.maxScore, e.data.time);
          }),
          H5P.on(a, "xAPI", H5P.xAPICompletedListener),
          !1 !== H5PIntegration.saveFreq &&
            (a.getCurrentState instanceof Function ||
              "function" == typeof a.getCurrentState) &&
            ((h = function () {
              var e = a.getCurrentState();
              (void 0 !== e &&
                H5P.setUserData(s, "state", e, { deleteOnChange: !0 }),
                H5PIntegration.saveFreq &&
                  (l = setTimeout(h, 1e3 * H5PIntegration.saveFreq)));
            }),
            H5PIntegration.saveFreq &&
              (l = setTimeout(h, 1e3 * H5PIntegration.saveFreq)),
            H5P.on(a, "xAPI", function (e) {
              e = e.getVerb();
              ("completed" !== e && "progressed" !== e) ||
                (clearTimeout(l), (l = setTimeout(h, 3e3)));
            })),
          H5P.isFramed &&
            (!1 === H5P.externalEmbed
              ? ((u = window.frameElement),
                H5P.on(a, "resize", function () {
                  (clearTimeout(c),
                    (c = setTimeout(function () {
                      var e;
                      window.parent.H5P.isFullscreen ||
                        ((e = u.parentElement.style.height),
                        (u.parentElement.style.height =
                          u.parentElement.clientHeight + "px"),
                        u.getBoundingClientRect(),
                        (u.style.height = "1px"),
                        (u.style.height =
                          u.contentDocument.body.scrollHeight + "px"),
                        (u.parentElement.style.height = e));
                    }, 1)));
                }))
              : H5P.communicator &&
                ((d = !1),
                H5P.communicator.on("ready", function () {
                  H5P.communicator.send("hello");
                }),
                H5P.communicator.on("hello", function () {
                  ((d = !0),
                    (document.body.style.height = "auto"),
                    (document.body.style.overflow = "hidden"),
                    H5P.trigger(a, "resize"));
                }),
                H5P.communicator.on("resizePrepared", function () {
                  H5P.communicator.send("resize", {
                    scrollHeight: document.body.scrollHeight,
                  });
                }),
                H5P.communicator.on("resize", function () {
                  H5P.trigger(a, "resize");
                }),
                H5P.on(a, "resize", function () {
                  H5P.isFullscreen ||
                    (clearTimeout(c),
                    (c = setTimeout(function () {
                      d
                        ? H5P.communicator.send("prepareResize", {
                            scrollHeight: document.body.scrollHeight,
                            clientHeight: document.body.clientHeight,
                          })
                        : H5P.communicator.send("hello");
                    }, 0)));
                }))),
          (H5P.isFramed && !1 !== H5P.externalEmbed) ||
            H5P.jQuery(window.parent).resize(function () {
              (window.parent.H5P.isFullscreen, H5P.trigger(a, "resize"));
            }),
          H5P.instances.push(a),
          H5P.trigger(a, "resize"),
          t.addClass("using-mouse"),
          t.on("mousedown keydown keyup", function (e) {
            t.toggleClass("using-mouse", "mousedown" === e.type);
          }),
          H5P.externalDispatcher &&
            H5P.externalDispatcher.trigger("initialized"));
      }),
      H5P.jQuery("iframe.h5p-iframe:not(.h5p-initialized)", e).each(
        function () {
          var e = H5P.jQuery(this)
              .addClass("h5p-initialized")
              .data("content-id"),
            t = H5PIntegration.contents["cid-" + e],
            t =
              t && t.metadata && t.metadata.defaultLanguage
                ? t.metadata.defaultLanguage
                : "en";
          (this.contentDocument.open(),
            this.contentDocument.write(
              '<!doctype html><html class="h5p-iframe" lang="' +
                t +
                '"><head>' +
                H5P.getHeadTags(e) +
                '</head><body><div class="h5p-content" data-content-id="' +
                e +
                '"/></body></html>',
            ),
            this.contentDocument.close());
        },
      ));
  }),
  (H5P.getHeadTags = function (e) {
    function t(e) {
      for (var t = "", i = 0; i < e.length; i++)
        t += '<link rel="stylesheet" href="' + e[i] + '">';
      return t;
    }
    function i(e) {
      for (var t = "", i = 0; i < e.length; i++)
        t += '<script src="' + e[i] + '"><\/script>';
      return t;
    }
    return (
      '<base target="_parent">' +
      t(H5PIntegration.core.styles) +
      t(H5PIntegration.contents["cid-" + e].styles) +
      i(H5PIntegration.core.scripts) +
      i(H5PIntegration.contents["cid-" + e].scripts) +
      "<script>H5PIntegration = window.parent.H5PIntegration; var H5P = H5P || {}; H5P.externalEmbed = false;<\/script>"
    );
  }),
  (H5P.communicator =
    window.postMessage && window.addEventListener
      ? new (function () {
          var i = {};
          (window.addEventListener(
            "message",
            function (e) {
              window.parent === e.source &&
                "h5p" === e.data.context &&
                void 0 !== i[e.data.action] &&
                i[e.data.action](e.data);
            },
            !1,
          ),
            (this.on = function (e, t) {
              i[e] = t;
            }),
            (this.send = function (e, t) {
              (((t = void 0 === t ? {} : t).context = "h5p"),
                (t.action = e),
                window.parent.postMessage(t, "*"));
            }));
        })()
      : void 0),
  (H5P.semiFullScreen = function (e, t, i, n) {
    H5P.fullScreen(e, t, i, n, !0);
  }),
  (H5P.fullScreen = function (e, t, i, n, s) {
    if (void 0 === H5P.exitFullScreen) {
      if (H5P.isFramed && !1 === H5P.externalEmbed)
        return (
          window.parent.H5P.fullScreen(e, t, i, H5P.$body.get(), s),
          (H5P.isFullscreen = !0),
          (H5P.exitFullScreen = function () {
            window.parent.H5P.exitFullScreen();
          }),
          void H5P.on(t, "exitFullScreen", function () {
            ((H5P.isFullscreen = !1), (H5P.exitFullScreen = void 0));
          })
        );
      var o,
        r,
        a,
        l = e;
      (void 0 === n
        ? (o = H5P.$body)
        : ((r = (o = H5P.jQuery(n)).add(e.get())),
          (n = "#h5p-iframe-" + e.parent().data("content-id")),
          (e = (a = H5P.jQuery(n)).parent())),
        (r = e.add(H5P.$body).add(r)));
      function h(e) {
        (r.addClass(e), void 0 !== a && a.css("height", ""));
      }
      function c() {
        (H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          H5P.trigger(t, "enterFullScreen"));
      }
      function u(e) {
        ((H5P.isFullscreen = !1),
          r.removeClass(e),
          H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          (H5P.exitFullScreen = void 0) !== i && i(),
          H5P.trigger(t, "exitFullScreen"));
      }
      if (
        ((H5P.isFullscreen = !0),
        void 0 === H5P.fullScreenBrowserPrefix || !0 === s)
      ) {
        if (!H5P.isFramed) {
          h("h5p-semi-fullscreen");
          var d,
            p,
            f = H5P.jQuery(
              '<div role="button" tabindex="0" class="h5p-disable-fullscreen" title="' +
                H5P.t("disableFullscreen") +
                '" aria-label="' +
                H5P.t("disableFullscreen") +
                '"></div>',
            ).appendTo(l.find(".h5p-content-controls")),
            g = (H5P.exitFullScreen = function () {
              (d ? (p.content = d) : v.removeChild(p),
                f.remove(),
                o.unbind("keyup", m),
                u("h5p-semi-fullscreen"));
            }),
            m = function (e) {
              27 === e.keyCode && g();
            };
          (f.click(g), o.keyup(m));
          for (
            var v, b = document.getElementsByTagName("meta"), y = 0;
            y < b.length;
            y++
          )
            if ("viewport" === b[y].name) {
              ((p = b[y]), (d = p.content));
              break;
            }
          (d || ((p = document.createElement("meta")).name = "viewport"),
            (p.content =
              "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"),
            d || (v = document.getElementsByTagName("head")[0]).appendChild(p),
            c());
        }
      } else {
        h("h5p-fullscreen");
        var _,
          w =
            "ms" === H5P.fullScreenBrowserPrefix
              ? "MSFullscreenChange"
              : H5P.fullScreenBrowserPrefix + "fullscreenchange";
        (document.addEventListener(w, function () {
          return void 0 === _
            ? ((_ = !1), void c())
            : (u("h5p-fullscreen"),
              void document.removeEventListener(w, arguments.callee, !1));
        }),
          "" === H5P.fullScreenBrowserPrefix
            ? e[0].requestFullScreen()
            : ((s =
                "ms" === H5P.fullScreenBrowserPrefix
                  ? "msRequestFullscreen"
                  : H5P.fullScreenBrowserPrefix + "RequestFullScreen"),
              (l =
                "webkit" === H5P.fullScreenBrowserPrefix &&
                0 === H5P.safariBrowser
                  ? Element.ALLOW_KEYBOARD_INPUT
                  : void 0),
              e[0][s](l)),
          (H5P.exitFullScreen = function () {
            "" === H5P.fullScreenBrowserPrefix
              ? document.exitFullscreen()
              : "moz" === H5P.fullScreenBrowserPrefix
                ? document.mozCancelFullScreen()
                : document[H5P.fullScreenBrowserPrefix + "ExitFullscreen"]();
          }));
      }
    }
  }),
  (function () {
    ((H5P.addQueryParameter = function (e, t) {
      let i, n;
      const s = e.split("?");
      return (
        (i = s[1]
          ? ((n = s[1].split("#")), s[0] + "?" + n[0] + "&")
          : ((n = s[0].split("#")), n[0] + "?")),
        (i += t),
        n[1] && (i += "#" + n[1]),
        i
      );
    }),
      (H5P.setSource = function (e, t, i) {
        let n = t.path;
        t = H5P.getCrossOrigin(t);
        (t
          ? ((e.crossOrigin = t),
            H5PIntegration.crossoriginCacheBuster &&
              (n = H5P.addQueryParameter(
                n,
                H5PIntegration.crossoriginCacheBuster,
              )))
          : e.removeAttribute("crossorigin"),
          (e.src = H5P.getPath(n, i)));
      }));
    function s(e) {
      return e.match(/^[a-z0-9]+:\/\//i);
    }
    ((H5P.getCrossOrigin = function (e) {
      return "object" != typeof e
        ? H5PIntegration.crossorigin &&
          H5PIntegration.crossoriginRegex &&
          e.match(H5PIntegration.crossoriginRegex)
          ? H5PIntegration.crossorigin
          : null
        : H5PIntegration.crossorigin && !s(e.path)
          ? H5PIntegration.crossorigin
          : void 0;
    }),
      (H5P.getPath = function (e, t) {
        if (s(e)) return e;
        var i,
          n = "#tmp" === e.substr(-4, 4);
        if (void 0 === t || n) {
          if (void 0 === window.H5PEditor) return;
          i = H5PEditor.filesPath;
        } else
          i =
            (i =
              void 0 !== H5PIntegration.contents &&
              H5PIntegration.contents["cid-" + t]
                ? H5PIntegration.contents["cid-" + t].contentUrl
                : i) || H5PIntegration.url + "/content/" + t;
        return (
          (i = !s(i)
            ? window.location.protocol + "//" + window.location.host + i
            : i) +
          "/" +
          e
        );
      }));
  })(),
  (H5P.getContentPath = function (e) {
    return H5PIntegration.url + "/content/" + e;
  }),
  (H5P.classFromName = function (e) {
    e = e.split(".");
    return this[e[e.length - 1]];
  }),
  (H5P.newRunnable = function (t, e, i, n, s) {
    var o, r;
    try {
      ((r = (a = t.library.split(" ", 2))[0]), (o = a[1].split(".", 2)));
    } catch (e) {
      return H5P.error("Invalid library string: " + t.library);
    }
    if (t.params instanceof Object != !0 || t.params instanceof Array == !0)
      return (
        H5P.error("Invalid library params for: " + t.library),
        H5P.error(t.params)
      );
    try {
      for (var a = a[0].split("."), l = window, h = 0; h < a.length; h++)
        l = l[a[h]];
      if ("function" != typeof l) throw null;
    } catch (e) {
      return H5P.error("Unable to find constructor for: " + t.library);
    }
    (void 0 === s && (s = {}),
      t.subContentId && (s.subContentId = t.subContentId),
      t.userDatas &&
        t.userDatas.state &&
        H5PIntegration.saveFreq &&
        (s.previousState = t.userDatas.state),
      t.metadata && (s.metadata = t.metadata));
    var c,
      u = s.standalone || !1;
    return (
      (l.prototype = H5P.jQuery.extend(
        {},
        H5P.ContentType(u).prototype,
        l.prototype,
      )),
      void 0 ===
        (c =
          -1 <
          H5P.jQuery.inArray(t.library, [
            "H5P.CoursePresentation 1.0",
            "H5P.CoursePresentation 1.1",
            "H5P.CoursePresentation 1.2",
            "H5P.CoursePresentation 1.3",
          ])
            ? new l(t.params, e)
            : new l(t.params, e, s)).$ && (c.$ = H5P.jQuery(c)),
      void 0 === c.contentId && (c.contentId = e),
      void 0 === c.subContentId &&
        t.subContentId &&
        (c.subContentId = t.subContentId),
      void 0 === c.parent && s && s.parent && (c.parent = s.parent),
      void 0 === c.libraryInfo &&
        (c.libraryInfo = {
          versionedName: t.library,
          versionedNameNoSpaces: r + "-" + o[0] + "." + o[1],
          machineName: r,
          majorVersion: o[0],
          minorVersion: o[1],
        }),
      void 0 !== i &&
        (i.toggleClass("h5p-standalone", u),
        c.attach(i),
        H5P.trigger(
          c,
          "domChanged",
          { $target: i, library: r, key: "newLibrary" },
          { bubbles: !0, external: !0 },
        ),
        (void 0 !== n && n) || H5P.trigger(c, "resize")),
      c
    );
  }),
  (H5P.error = function (e) {
    void 0 !== window.console &&
      void 0 !== console.error &&
      console.error(e.stack || e);
  }),
  (H5P.t = function (e, t, i) {
    if ((void 0 === i && (i = "H5P"), void 0 === H5PIntegration.l10n[i]))
      return '[Missing translation namespace "' + i + '"]';
    if (void 0 === H5PIntegration.l10n[i][e])
      return '[Missing translation "' + e + '" in "' + i + '"]';
    var n = H5PIntegration.l10n[i][e];
    if (void 0 !== t) for (var s in t) n = n.replace(s, t[s]);
    return n;
  }),
  (H5P.Dialog = function (e, t, i, n) {
    var s = this,
      o = H5P.jQuery(
        '<div class="h5p-popup-dialog h5p-' +
          e +
          '-dialog" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2>' +
          t +
          '</h2>                                <div class="h5p-scroll-content">' +
          i +
          '</div>                                <div class="h5p-close" role="button" tabindex="0" aria-label="' +
          H5P.t("close") +
          '" title="' +
          H5P.t("close") +
          '"></div>                              </div>                            </div>',
      )
        .insertAfter(n)
        .click(function (e) {
          (e && e.originalEvent && e.originalEvent.preventClosing) || s.close();
        })
        .children(".h5p-inner")
        .click(function (e) {
          e.originalEvent.preventClosing = !0;
        })
        .find(".h5p-close")
        .click(function () {
          s.close();
        })
        .keypress(function (e) {
          if (13 === e.which || 32 === e.which) return (s.close(), !1);
        })
        .end()
        .find("a")
        .click(function (e) {
          e.stopPropagation();
        })
        .end()
        .end();
    ((s.open = function (e) {
      (e && o.css("height", "100%"),
        setTimeout(function () {
          (o.addClass("h5p-open"),
            H5P.jQuery(s).trigger("dialog-opened", [o]),
            o.focus());
        }, 1));
    }),
      (s.close = function () {
        (o.removeClass("h5p-open"),
          setTimeout(function () {
            (o.remove(),
              H5P.jQuery(s).trigger("dialog-closed", [o]),
              n.attr("tabindex", "-1"),
              n.focus());
          }, 200));
      }));
  }),
  (H5P.getCopyrights = function (e, t, i, n) {
    var s;
    if (void 0 !== e.getCopyrights)
      try {
        s = e.getCopyrights();
      } catch (e) {}
    void 0 === s &&
      ((s = new H5P.ContentCopyrights()), H5P.findCopyrights(s, t, i));
    e = H5P.buildMetadataCopyrights(n, e.libraryInfo.machineName);
    return (
      void 0 !== e && s.addMediaInFront(e),
      (s = void 0 !== s ? s.toString() : s)
    );
  }),
  (H5P.findCopyrights = function (o, e, t, i) {
    var n, s, r, a;
    for (s in (i && ((i.params = e), l(i, i.machineName, t)), e))
      e.hasOwnProperty(s) &&
        ("overrideSettings" !== s
          ? ((r = e[s]) && r.library && "string" == typeof r.library
              ? (n = r.library.split(" ")[0])
              : r &&
                r.library &&
                "object" == typeof r.library &&
                (n =
                  r.library.library && "string" == typeof r.library.library
                    ? r.library.library.split(" ")[0]
                    : n),
            r instanceof Array
              ? H5P.findCopyrights(o, r, t)
              : r instanceof Object &&
                (l(r, n, t),
                void 0 === r.copyright ||
                void 0 === r.copyright.license ||
                void 0 === r.path ||
                void 0 === r.mime
                  ? H5P.findCopyrights(o, r, t)
                  : ((a = new H5P.MediaCopyright(r.copyright)),
                    void 0 !== r.width &&
                      void 0 !== r.height &&
                      a.setThumbnail(
                        new H5P.Thumbnail(
                          H5P.getPath(r.path, t),
                          r.width,
                          r.height,
                        ),
                      ),
                    o.addMedia(a))))
          : (console.warn(
              "The semantics field 'overrideSettings' is DEPRECATED and should not be used.",
            ),
            console.warn(e)));
    function l(e, t, i) {
      if (e.metadata) {
        const s = H5P.buildMetadataCopyrights(e.metadata, t);
        var n;
        void 0 !== s &&
          (e.params &&
            "Image" === e.params.contentName &&
            e.params.file &&
            ((n = e.params.file.path),
            (t = e.params.file.width),
            (e = e.params.file.height),
            s.setThumbnail(new H5P.Thumbnail(H5P.getPath(n, i), t, e))),
          o.addMedia(s));
      }
    }
  }),
  (H5P.buildMetadataCopyrights = function (e) {
    if (e && void 0 !== e.license && "U" !== e.license) {
      e = {
        contentType: e.contentType,
        title: e.title,
        author:
          e.authors && 0 < e.authors.length
            ? e.authors
                .map(function (e) {
                  return e.role ? e.name + " (" + e.role + ")" : e.name;
                })
                .join(", ")
            : void 0,
        source: e.source,
        year: e.yearFrom
          ? e.yearFrom + (e.yearTo ? "-" + e.yearTo : "")
          : void 0,
        license: e.license,
        version: e.licenseVersion,
        licenseExtras: e.licenseExtras,
        changes:
          e.changes && 0 < e.changes.length
            ? e.changes
                .map(function (e) {
                  return (
                    e.log +
                    (e.author ? ", " + e.author : "") +
                    (e.date ? ", " + e.date : "")
                  );
                })
                .join(" / ")
            : void 0,
      };
      return new H5P.MediaCopyright(e);
    }
  }),
  (H5P.openReuseDialog = function (e, i, n, s, o) {
    let t = "";
    (i.displayOptions.export &&
      (t +=
        '<button type="button" class="h5p-big-button h5p-download-button"><div class="h5p-button-title">Download as an .h5p file</div><div class="h5p-button-description">.h5p files may be uploaded to any web-site where H5P content may be created.</div></button>'),
      i.displayOptions.export &&
        i.displayOptions.copy &&
        (t += '<div class="h5p-horizontal-line-text"><span>or</span></div>'),
      i.displayOptions.copy &&
        (t +=
          '<button type="button" class="h5p-big-button h5p-copy-button"><div class="h5p-button-title">Copy content</div><div class="h5p-button-description">Copied content may be pasted anywhere this content type is supported on this website.</div></button>'));
    const r = new H5P.Dialog("reuse", H5P.t("reuseContent"), t, e);
    (H5P.jQuery(r)
      .on("dialog-opened", function (e, t) {
        (H5P.jQuery(
          '<a href="https://h5p.org/node/442225" target="_blank">More Info</a>',
        )
          .click(function (e) {
            e.stopPropagation();
          })
          .appendTo(t.find("h2")),
          t.find(".h5p-download-button").click(function () {
            ((window.location.href = i.exportUrl),
              s.triggerXAPI("downloaded"),
              r.close());
          }),
          t.find(".h5p-copy-button").click(function () {
            const e = new H5P.ClipboardItem(n);
            ((e.contentId = o),
              H5P.setClipboard(e),
              s.triggerXAPI("copied"),
              r.close(),
              H5P.attachToastTo(
                H5P.jQuery(".h5p-content:first")[0],
                H5P.t("contentCopied"),
                {
                  position: {
                    horizontal: "centered",
                    vertical: "centered",
                    noOverflowX: !0,
                  },
                },
              ));
          }),
          H5P.trigger(s, "resize"));
      })
      .on("dialog-closed", function () {
        H5P.trigger(s, "resize");
      }),
      r.open());
  }),
  (H5P.openEmbedDialog = function (e, t, i, h, c) {
    var u = t + i,
      e = new H5P.Dialog(
        "embed",
        H5P.t("embed"),
        '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' +
          H5P.t("size") +
          ': <input type="text" value="' +
          Math.ceil(h.width) +
          '" class="h5p-embed-size"/> × <input type="text" value="' +
          Math.ceil(h.height) +
          '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' +
          H5P.t("showAdvanced") +
          '</div><div class="h5p-expander-content"><p>' +
          H5P.t("advancedHelp") +
          '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' +
          i +
          "</textarea></div>",
        e,
      );
    (H5P.jQuery(e)
      .on("dialog-opened", function (e, i) {
        function n() {
          H5P.trigger(c, "resize");
        }
        function t(e, t) {
          return ((e = parseFloat(e.val())), isNaN(e) ? t : Math.ceil(e));
        }
        function s() {
          i.find(".h5p-embed-code-container:first").val(
            u.replace(":w", t(r, h.width)).replace(":h", t(a, h.height)),
          );
        }
        var o = i.find(".h5p-inner").find(".h5p-scroll-content"),
          r =
            (o.outerHeight(), o.innerHeight(), i.find(".h5p-embed-size:eq(0)")),
          a = i.find(".h5p-embed-size:eq(1)");
        (r.change(s),
          a.change(s),
          s(),
          i.find(".h5p-embed-code-container").each(function () {
            H5P.jQuery(this)
              .css("height", this.scrollHeight + "px")
              .focus(function () {
                H5P.jQuery(this).select();
              });
          }),
          i.find(".h5p-embed-code-container").eq(0).select(),
          n());
        function l() {
          var e = H5P.jQuery(this),
            t = e.next();
          (t.is(":visible")
            ? (e
                .removeClass("h5p-open")
                .text(H5P.t("showAdvanced"))
                .attr("aria-expanded", "true"),
              t.hide())
            : (e
                .addClass("h5p-open")
                .text(H5P.t("hideAdvanced"))
                .attr("aria-expanded", "false"),
              t.show()),
            i.find(".h5p-embed-code-container").each(function () {
              H5P.jQuery(this).css("height", this.scrollHeight + "px");
            }),
            n());
        }
        i.find(".h5p-expander")
          .click(l)
          .keypress(function (e) {
            if (32 === e.keyCode) return (l.apply(this), !1);
          });
      })
      .on("dialog-closed", function () {
        H5P.trigger(c, "resize");
      }),
      e.open());
  }),
  (H5P.attachToastTo = function (t, e, i) {
    if (void 0 === t || void 0 === e) return;
    function n(e) {
      -1 === s(e).indexOf(t) && (clearTimeout(l), o());
    }
    const s = function (e) {
        var t = (e.composedPath && e.composedPath()) || e.path,
          e = e.target;
        return null != t
          ? t.indexOf(window) < 0
            ? t.concat(window)
            : t
          : e === window
            ? [window]
            : [e].concat(
                (function e(t, i) {
                  i = i || [];
                  t = t.parentNode;
                  return t ? e(t, i.concat(t)) : i;
                })(e),
                window,
              );
      },
      o = function () {
        (document.removeEventListener("click", n),
          r.parentNode && r.parentNode.removeChild(r));
      };
    (((i = i || {}).style = i.style || "h5p-toast"),
      (i.duration = i.duration || 3e3));
    const r = document.createElement("div");
    (r.setAttribute("id", i.style),
      r.classList.add("h5p-toast-disabled"),
      r.classList.add(i.style));
    const a = document.createElement("span");
    ((a.innerHTML = e), r.appendChild(a), document.body.appendChild(r));
    e = (function (e, t, i) {
      (((i = i || {}).offsetHorizontal = i.offsetHorizontal || 0),
        (i.offsetVertical = i.offsetVertical || 0));
      var n = t.getBoundingClientRect(),
        s = e.getBoundingClientRect();
      let o = 0,
        r = 0;
      switch (i.horizontal) {
        case "before":
          o = s.left - n.width - i.offsetHorizontal;
          break;
        case "after":
          o = s.left + s.width + i.offsetHorizontal;
          break;
        case "left":
          o = s.left + i.offsetHorizontal;
          break;
        case "right":
          o = s.left + s.width - n.width - i.offsetHorizontal;
          break;
        default:
          o = s.left + s.width / 2 - n.width / 2 + i.offsetHorizontal;
      }
      switch (i.vertical) {
        case "above":
          r = s.top - n.height - i.offsetVertical;
          break;
        case "below":
          r = s.top + s.height + i.offsetVertical;
          break;
        case "top":
          r = s.top + i.offsetVertical;
          break;
        case "bottom":
          r = s.top + s.height - n.height - i.offsetVertical;
          break;
        case "centered":
          r = s.top + s.height / 2 - n.height / 2 + i.offsetVertical;
          break;
        default:
          r = s.top + s.height + i.offsetVertical;
      }
      const a = document.body;
      e = a.getBoundingClientRect();
      return (
        (i.noOverflowLeft || i.noOverflowX) && o < e.x && (o = e.x),
        (i.noOverflowRight || i.noOverflowX) &&
          o + n.width > e.x + e.width &&
          (o = e.x + e.width - n.width),
        (i.noOverflowTop || i.noOverflowY) && r < e.y && (r = e.y),
        (i.noOverflowBottom || i.noOverflowY) &&
          r + n.height > e.y + e.height &&
          (o = e.y + e.height - n.height),
        { left: o, top: r }
      );
    })(t, r, i.position);
    ((r.style.left = Math.round(e.left) + "px"),
      (r.style.top = Math.round(e.top) + "px"),
      r.classList.remove("h5p-toast-disabled"));
    const l = setTimeout(o, i.duration);
    document.addEventListener("click", n);
  }),
  (H5P.ContentCopyrights = function () {
    var i,
      n = [],
      s = [];
    ((this.setLabel = function (e) {
      i = e;
    }),
      (this.addMedia = function (e) {
        void 0 !== e && n.push(e);
      }),
      (this.addMediaInFront = function (e) {
        void 0 !== e && n.unshift(e);
      }),
      (this.addContent = function (e) {
        void 0 !== e && s.push(e);
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < n.length; t++) e += n[t];
        for (t = 0; t < s.length; t++) e += s[t];
        return (e =
          "" !== e
            ? '<div class="h5p-content-copyrights">' +
              (e = void 0 !== i ? "<h3>" + i + "</h3>" + e : e) +
              "</div>"
            : e);
      }));
  }),
  (H5P.MediaCopyright = function (e, t, i, n) {
    function s(e) {
      return void 0 === t || void 0 === t[e] ? H5P.t(e) : t[e];
    }
    function o(e, t) {
      var i,
        n = H5P.copyrightLicenses[e],
        s = "";
      (("PD" === e && t) || (s += n.hasOwnProperty("label") ? n.label : n),
        (i =
          n.versions &&
          (t =
            !n.versions.default || (t && n.versions[t])
              ? t
              : n.versions.default) &&
          n.versions[t]
            ? n.versions[t]
            : i) &&
          (s && (s += " "), (s += i.hasOwnProperty("label") ? i.label : i)),
        n.hasOwnProperty("link")
          ? (o = n.link.replace(
              ":version",
              n.linkVersions ? n.linkVersions[t] : t,
            ))
          : i && n.hasOwnProperty("link") && (o = i.link),
        o && (s = '<a href="' + o + '" target="_blank">' + s + "</a>"));
      var o = "";
      return (
        "PD" !== e && "C" !== e && (o += e),
        t && "CC0 1.0" !== t && (o && "GNU GPL" !== e && (o += " "), (o += t)),
        o && (s += " (" + o + ")"),
        "C" === e && (s += " &copy;"),
        s
      );
    }
    var r,
      a = new H5P.DefinitionList();
    if (void 0 !== e) {
      for (var l in n) n.hasOwnProperty(l) && (e[l] = n[l]);
      void 0 === i &&
        (i = [
          "contentType",
          "title",
          "license",
          "author",
          "year",
          "source",
          "licenseExtras",
          "changes",
        ]);
      for (var h = 0; h < i.length; h++) {
        var c,
          u = i[h];
        void 0 !== e[u] &&
          "" !== e[u] &&
          ((c = e[u]),
          "license" === u && (c = o(e.license, e.version)),
          "source" === u &&
            (c = c
              ? '<a href="' + c + '" target="_blank">' + c + "</a>"
              : void 0),
          a.add(new H5P.Field(s(u), c)));
      }
    }
    ((this.setThumbnail = function (e) {
      r = e;
    }),
      (this.undisclosed = function () {
        if (1 === a.size()) {
          var e = a.get(0);
          if (e.getLabel() === s("license") && e.getValue() === o("U"))
            return !0;
        }
        return !1;
      }),
      (this.toString = function () {
        var e = "";
        return this.undisclosed()
          ? e
          : (void 0 !== r && (e += r),
            "" !== (e += a)
              ? '<div class="h5p-media-copyright">' + e + "</div>"
              : e);
      }));
  }),
  (H5P.Thumbnail = function (e, t, i) {
    var n;
    (void 0 !== t && (n = Math.round((t / i) * 100)),
      (this.toString = function () {
        return (
          '<img src="' +
          e +
          '" alt="' +
          H5P.t("thumbnail") +
          '" class="h5p-thumbnail" height="100"' +
          (void 0 === n ? "" : ' width="' + n + '"') +
          "/>"
        );
      }));
  }),
  (H5P.Field = function (e, t) {
    ((this.getLabel = function () {
      return e;
    }),
      (this.getValue = function () {
        return t;
      }));
  }),
  (H5P.DefinitionList = function () {
    var n = [];
    ((this.add = function (e) {
      n.push(e);
    }),
      (this.size = function () {
        return n.length;
      }),
      (this.get = function (e) {
        return n[e];
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < n.length; t++) {
          var i = n[t];
          e += "<dt>" + i.getLabel() + "</dt><dd>" + i.getValue() + "</dd>";
        }
        return "" === e ? e : '<dl class="h5p-definition-list">' + e + "</dl>";
      }));
  }),
  (H5P.Coords = function (e, t, i, n) {
    return this instanceof H5P.Coords
      ? ((this.x = 0),
        (this.y = 0),
        (this.w = 1),
        (this.h = 1),
        "object" == typeof e
          ? ((this.x = e.x), (this.y = e.y), (this.w = e.w), (this.h = e.h))
          : (void 0 !== e && (this.x = e),
            void 0 !== t && (this.y = t),
            void 0 !== i && (this.w = i),
            void 0 !== n && (this.h = n)),
        this)
      : new H5P.Coords(e, t, i, n);
  }),
  (H5P.libraryFromString = function (e) {
    e = /(.+)\s(\d+)\.(\d+)$/g.exec(e);
    return (
      null !== e && {
        machineName: e[1],
        majorVersion: parseInt(e[2]),
        minorVersion: parseInt(e[3]),
      }
    );
  }),
  (H5P.getLibraryPath = function (e) {
    return void 0 !== H5PIntegration.urlLibraries
      ? H5PIntegration.urlLibraries + "/" + e
      : H5PIntegration.url + "/libraries/" + e;
  }),
  (H5P.cloneObject = function (e, t) {
    var i,
      n = e instanceof Array ? [] : {};
    for (i in e)
      e.hasOwnProperty(i) &&
        (void 0 !== t && t && "object" == typeof e[i]
          ? (n[i] = H5P.cloneObject(e[i], t))
          : (n[i] = e[i]));
    return n;
  }),
  (H5P.trim = function (e) {
    return e.replace(/^\s+|\s+$/g, "");
  }),
  (H5P.jsLoaded = function (e) {
    return (
      (H5PIntegration.loadedJs = H5PIntegration.loadedJs || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedJs)
    );
  }),
  (H5P.cssLoaded = function (e) {
    return (
      (H5PIntegration.loadedCss = H5PIntegration.loadedCss || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedCss)
    );
  }),
  (H5P.shuffleArray = function (e) {
    if (e instanceof Array) {
      var t,
        i,
        n,
        s = e.length;
      if (0 === s) return !1;
      for (; --s; )
        ((t = Math.floor(Math.random() * (s + 1))),
          (i = e[s]),
          (n = e[t]),
          (e[s] = n),
          (e[t] = i));
      return e;
    }
  }),
  (H5P.setFinished = function (e, t, i, n) {
    if (
      ("number" == typeof t || t instanceof Number) &&
      !0 === H5PIntegration.postUserStatistics
    ) {
      function s(e) {
        return Math.round(e.getTime() / 1e3);
      }
      const o = {
        contentId: e,
        score: t,
        maxScore: i,
        opened: s(H5P.opened[e]),
        finished: s(new Date()),
        time: n,
      };
      H5P.jQuery.post(H5PIntegration.ajax.setFinished, o).fail(function () {
        H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished, o);
      });
    }
  }),
  Array.prototype.indexOf ||
    (Array.prototype.indexOf = function (e) {
      for (var t = 0; t < this.length; t++) if (this[t] === e) return t;
      return -1;
    }),
  void 0 === String.prototype.trim &&
    (String.prototype.trim = function () {
      return H5P.trim(this);
    }),
  (H5P.trigger = function (e, t, i, n) {
    void 0 !== e.trigger
      ? e.trigger(t, i, n)
      : void 0 !== e.$ && void 0 !== e.$.trigger && e.$.trigger(t);
  }),
  (H5P.on = function (e, t, i) {
    void 0 !== e.on
      ? e.on(t, i)
      : void 0 !== e.$ && void 0 !== e.$.on && e.$.on(t, i);
  }),
  (H5P.createUUID = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (e) {
        var t = (16 * Math.random()) | 0;
        return ("x" === e ? t : (3 & t) | 8).toString(16);
      },
    );
  }),
  (H5P.createTitle = function (e, t) {
    if (!e) return "";
    void 0 === t && (t = 60);
    e = H5P.jQuery("<div></div>")
      .text(e.replace(/(<([^>]+)>)/gi, ""))
      .text();
    return (e = e.length > t ? e.substr(0, t - 3) + "..." : e);
  }),
  (function (l) {
    function a(e, t, i, n, s, o, r, a) {
      void 0 !== H5PIntegration.user
        ? ((a = {
            url: H5PIntegration.ajax.contentUserData
              .replace(":contentId", e)
              .replace(":dataType", t)
              .replace(":subContentId", i || 0),
            dataType: "json",
            async: void 0 === a || a,
          }),
          void 0 !== s
            ? ((a.type = "POST"),
              (a.data = {
                data: null === s ? 0 : s,
                preload: o ? 1 : 0,
                invalidate: r ? 1 : 0,
              }))
            : (a.type = "GET"),
          void 0 !== n &&
            ((a.error = function (e, t) {
              n(t);
            }),
            (a.success = function (e) {
              e.success
                ? !1 !== e.data && void 0 !== e.data
                  ? n(void 0, e.data)
                  : n()
                : n(e.message);
            })),
          l.ajax(a))
        : n("Not signed in.");
    }
    ((H5P.getUserData = function (e, i, n, s) {
      ((s = s || 0), (H5PIntegration.contents = H5PIntegration.contents || {}));
      var o = H5PIntegration.contents["cid-" + e] || {},
        r = o.contentUserData;
      if (r && r[s] && void 0 !== r[s][i])
        if ("RESET" !== r[s][i])
          try {
            n(void 0, JSON.parse(r[s][i]));
          } catch (e) {
            n(e);
          }
        else n(void 0, null);
      else
        a(e, i, s, function (e, t) {
          if (e || void 0 === t) n(e, t);
          else {
            (void 0 === o.contentUserData && (o.contentUserData = r = {}),
              void 0 === r[s] && (r[s] = {}),
              (r[s][i] = t));
            try {
              n(void 0, JSON.parse(t));
            } catch (e) {
              n(e);
            }
          }
        });
    }),
      (H5P.setUserData = function (e, t, i, n) {
        var s = H5P.jQuery.extend(
          !0,
          {},
          { subContentId: 0, preloaded: !0, deleteOnChange: !1, async: !0 },
          n,
        );
        try {
          i = JSON.stringify(i);
        } catch (e) {
          return void (s.errorCallback && s.errorCallback(e));
        }
        n = H5PIntegration.contents["cid-" + e];
        (n = void 0 === n ? (H5PIntegration.contents["cid-" + e] = {}) : n)
          .contentUserData || (n.contentUserData = {});
        n = n.contentUserData;
        (void 0 === n[s.subContentId] && (n[s.subContentId] = {}),
          i !== n[s.subContentId][t] &&
            ((n[s.subContentId][t] = i),
            a(
              e,
              t,
              s.subContentId,
              function (e) {
                s.errorCallback && e && s.errorCallback(e);
              },
              i,
              s.preloaded,
              s.deleteOnChange,
              s.async,
            )));
      }),
      (H5P.deleteUserData = function (e, t, i) {
        i = i || 0;
        var n = H5PIntegration.contents["cid-" + e].contentUserData;
        (n && n[i] && n[i][t] && delete n[i][t], a(e, t, i, void 0, null));
      }),
      (H5P.getContentForInstance = function (e) {
        e = "cid-" + e;
        return H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[e]
          ? H5PIntegration.contents[e]
          : void 0;
      }),
      (H5P.ClipboardItem = function (e, t, i) {
        var n = this;
        (t || ((t = "action"), (e = { action: e })),
          (n.specific = e),
          t && e[t] && (n.generic = t),
          i && (n.from = i),
          window.H5PEditor &&
            H5PEditor.contentId &&
            (n.contentId = H5PEditor.contentId),
          n.specific.width ||
            n.specific.height ||
            !n.generic ||
            ((i = n.specific[n.generic]).params.file &&
              i.params.file.width &&
              i.params.file.height &&
              ((n.width = 20),
              (n.height =
                (i.params.file.height / i.params.file.width) * n.width))));
      }),
      (H5P.clipboardify = function (e) {
        (e instanceof H5P.ClipboardItem || (e = new H5P.ClipboardItem(e)),
          H5P.setClipboard(e));
      }),
      (H5P.getClipboard = function () {
        return e();
      }),
      (H5P.setClipboard = function (e) {
        (localStorage.setItem("h5pClipboard", JSON.stringify(e)),
          H5P.externalDispatcher.trigger("datainclipboard", { reset: !1 }));
      }),
      (H5P.getLibraryConfig = function (e) {
        return H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[e]
          ? H5PIntegration.libraryConfig[e]
          : {};
      }));
    var e = function () {
        var t = localStorage.getItem("h5pClipboard");
        if (t) {
          try {
            t = JSON.parse(t);
          } catch (e) {
            return void console.error(
              "Unable to parse JSON from clipboard.",
              e,
            );
          }
          return (
            n(t.specific, function (e) {
              return "#tmp" === e.substr(-4, 4) ||
                !t.contentId ||
                e.match(/^https?:\/\//i)
                ? e
                : H5PEditor.contentId
                  ? "../" + t.contentId + "/" + e
                  : (H5PEditor.contentRelUrl || "../content/") +
                    t.contentId +
                    "/" +
                    e;
            }),
            t.generic && (t.generic = t.specific[t.generic]),
            t
          );
        }
      },
      n = function (e, t) {
        for (var i in e)
          e.hasOwnProperty(i) &&
            e[i] instanceof Object &&
            (void 0 !== (i = e[i]).path && void 0 !== i.mime
              ? (i.path = t(i.path))
              : (void 0 !== i.library &&
                  void 0 !== i.subContentId &&
                  delete i.subContentId,
                n(i, t)));
      };
    l(document).ready(function () {
      window.addEventListener("storage", function (e) {
        "h5pClipboard" === e.key &&
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: null === e.newValue,
          });
      });
      var s,
        e,
        t = {
          default: "4.0",
          "4.0": H5P.t("licenseCC40"),
          "3.0": H5P.t("licenseCC30"),
          2.5: H5P.t("licenseCC25"),
          "2.0": H5P.t("licenseCC20"),
          "1.0": H5P.t("licenseCC10"),
        };
      ((H5P.copyrightLicenses = {
        U: H5P.t("licenseU"),
        "CC BY": {
          label: H5P.t("licenseCCBY"),
          link: "http://creativecommons.org/licenses/by/:version",
          versions: t,
        },
        "CC BY-SA": {
          label: H5P.t("licenseCCBYSA"),
          link: "http://creativecommons.org/licenses/by-sa/:version",
          versions: t,
        },
        "CC BY-ND": {
          label: H5P.t("licenseCCBYND"),
          link: "http://creativecommons.org/licenses/by-nd/:version",
          versions: t,
        },
        "CC BY-NC": {
          label: H5P.t("licenseCCBYNC"),
          link: "http://creativecommons.org/licenses/by-nc/:version",
          versions: t,
        },
        "CC BY-NC-SA": {
          label: H5P.t("licenseCCBYNCSA"),
          link: "http://creativecommons.org/licenses/by-nc-sa/:version",
          versions: t,
        },
        "CC BY-NC-ND": {
          label: H5P.t("licenseCCBYNCND"),
          link: "http://creativecommons.org/licenses/by-nc-nd/:version",
          versions: t,
        },
        "CC0 1.0": {
          label: H5P.t("licenseCC010"),
          link: "https://creativecommons.org/publicdomain/zero/1.0/",
        },
        "GNU GPL": {
          label: H5P.t("licenseGPL"),
          link: "http://www.gnu.org/licenses/gpl-:version-standalone.html",
          linkVersions: { v3: "3.0", v2: "2.0", v1: "1.0" },
          versions: {
            default: "v3",
            v3: H5P.t("licenseV3"),
            v2: H5P.t("licenseV2"),
            v1: H5P.t("licenseV1"),
          },
        },
        PD: {
          label: H5P.t("licensePD"),
          versions: {
            "CC0 1.0": {
              label: H5P.t("licenseCC010"),
              link: "https://creativecommons.org/publicdomain/zero/1.0/",
            },
            "CC PDM": {
              label: H5P.t("licensePDM"),
              link: "https://creativecommons.org/publicdomain/mark/1.0/",
            },
          },
        },
        "ODC PDDL":
          '<a href="http://opendatacommons.org/licenses/pddl/1.0/" target="_blank">Public Domain Dedication and Licence</a>',
        "CC PDM": {
          label: H5P.t("licensePDM"),
          link: "https://creativecommons.org/publicdomain/mark/1.0/",
        },
        C: H5P.t("licenseC"),
      }),
        H5P.isFramed &&
          !1 === H5P.externalEmbed &&
          H5P.externalDispatcher.on("*", function (e) {
            window.parent.H5P.externalDispatcher.trigger.call(this, e);
          }),
        H5P.preventInit || H5P.init(document.body),
        !1 !== H5PIntegration.saveFreq &&
          ((s = 0),
          (e = function () {
            var e = new Date().getTime();
            if (250 < e - s) {
              s = e;
              for (var t = 0; t < H5P.instances.length; t++) {
                var i,
                  n = H5P.instances[t];
                !(
                  n.getCurrentState instanceof Function ||
                  "function" == typeof n.getCurrentState
                ) ||
                  (void 0 !== (i = n.getCurrentState()) &&
                    H5P.setUserData(n.contentId, "state", i, {
                      deleteOnChange: !0,
                      async: !1,
                    }));
              }
            }
          }),
          H5P.$window.one("beforeunload unload", function () {
            (H5P.$window.off("pagehide beforeunload unload"), e());
          }),
          H5P.$window.on("pagehide", e)));
    });
  })(H5P.jQuery),
  ((H5P = window.H5P = window.H5P || {}).Event = function (e, t, i) {
    ((this.type = e), (this.data = t));
    var n = !1,
      s = !1,
      o = !1;
    (!0 === (i = void 0 === i ? {} : i).bubbles && (n = !0),
      !0 === i.external && (s = !0),
      (this.preventBubbling = function () {
        n = !1;
      }),
      (this.getBubbles = function () {
        return n;
      }),
      (this.scheduleForExternal = function () {
        return !(!s || o) && (o = !0);
      }));
  }),
  (H5P.EventDispatcher = function () {
    var s = this,
      r = {};
    function n(e, t) {
      if (void 0 !== r[e])
        for (var i = r[e].slice(), n = 0; n < i.length; n++) {
          var s = i[n],
            o = s.thisArg || this;
          s.listener.call(o, t);
        }
    }
    ((this.on = function (e, t, i) {
      if ("function" != typeof t)
        throw TypeError("listener must be a function");
      s.trigger("newListener", { type: e, listener: t });
      i = { listener: t, thisArg: i };
      r[e] ? r[e].push(i) : (r[e] = [i]);
    }),
      (this.once = function (e, t, i) {
        if (!(t instanceof Function))
          throw TypeError("listener must be a function");
        var n = function (e) {
          (s.off(e.type, n), t.call(this, e));
        };
        s.on(e, n, i);
      }),
      (this.off = function (e, t) {
        if (void 0 !== t && !(t instanceof Function))
          throw TypeError("listener must be a function");
        if (void 0 !== r[e]) {
          if (void 0 === t)
            return (delete r[e], void s.trigger("removeListener", e));
          for (var i = 0; i < r[e].length; i++)
            if (r[e][i].listener === t) {
              (r[e].splice(i, 1),
                s.trigger("removeListener", e, { listener: t }));
              break;
            }
          r[e].length || delete r[e];
        }
      }),
      (this.trigger = function (e, t, i) {
        void 0 !== e &&
          (e instanceof String || "string" == typeof e
            ? (e = new H5P.Event(e, t, i))
            : void 0 !== t && (e.data = t),
          (t = e.scheduleForExternal()),
          n.call(this, e.type, e),
          n.call(this, "*", e),
          e.getBubbles() &&
            s.parent instanceof H5P.EventDispatcher &&
            (s.parent.trigger instanceof Function ||
              "function" == typeof s.parent.trigger) &&
            s.parent.trigger(e),
          t && H5P.externalDispatcher.trigger.call(this, e));
      }));
  }),
  ((H5P = window.H5P = window.H5P || {}).XAPIEvent = function () {
    H5P.Event.call(
      this,
      "xAPI",
      { statement: {} },
      { bubbles: !0, external: !0 },
    );
  }),
  (H5P.XAPIEvent.prototype = Object.create(H5P.Event.prototype)),
  (H5P.XAPIEvent.prototype.constructor = H5P.XAPIEvent),
  (H5P.XAPIEvent.prototype.setScoredResult = function (e, t, i, n, s) {
    ((this.data.statement.result = {}),
      void 0 !== e &&
        (void 0 === t
          ? (this.data.statement.result.score = { raw: e })
          : ((this.data.statement.result.score = { min: 0, max: t, raw: e }),
            0 < t &&
              (this.data.statement.result.score.scaled =
                Math.round((e / t) * 1e4) / 1e4))),
      (this.data.statement.result.completion =
        void 0 === n
          ? "completed" === this.getVerb() || "answered" === this.getVerb()
          : n),
      void 0 !== s && (this.data.statement.result.success = s),
      i &&
        i.activityStartTime &&
        ((i = Math.round((Date.now() - i.activityStartTime) / 10) / 100),
        (this.data.statement.result.duration = "PT" + i + "S")));
  }),
  (H5P.XAPIEvent.prototype.setVerb = function (e) {
    -1 !== H5P.jQuery.inArray(e, H5P.XAPIEvent.allowedXAPIVerbs)
      ? (this.data.statement.verb = {
          id: "http://adlnet.gov/expapi/verbs/" + e,
          display: { "en-US": e },
        })
      : void 0 !== e.id && (this.data.statement.verb = e);
  }),
  (H5P.XAPIEvent.prototype.getVerb = function (e) {
    var t = this.data.statement;
    return "verb" in t ? (!0 === e ? t.verb : t.verb.id.slice(31)) : null;
  }),
  (H5P.XAPIEvent.prototype.setObject = function (e) {
    e.contentId
      ? ((this.data.statement.object = {
          id: this.getContentXAPIId(e),
          objectType: "Activity",
          definition: {
            extensions: {
              "http://h5p.org/x-api/h5p-local-content-id": e.contentId,
            },
          },
        }),
        e.subContentId
          ? ((this.data.statement.object.definition.extensions[
              "http://h5p.org/x-api/h5p-subContentId"
            ] = e.subContentId),
            "function" == typeof e.getTitle &&
              (this.data.statement.object.definition.name = {
                "en-US": e.getTitle(),
              }))
          : (e = H5P.getContentForInstance(e.contentId)) &&
            e.metadata &&
            e.metadata.title &&
            (this.data.statement.object.definition.name = {
              "en-US": H5P.createTitle(e.metadata.title),
            }))
      : (this.data.statement.object = { definition: {} });
  }),
  (H5P.XAPIEvent.prototype.setContext = function (e) {
    (e.parent &&
      (e.parent.contentId || e.parent.subContentId) &&
      (this.data.statement.context = {
        contextActivities: {
          parent: [
            { id: this.getContentXAPIId(e.parent), objectType: "Activity" },
          ],
        },
      }),
      e.libraryInfo &&
        (void 0 === this.data.statement.context &&
          (this.data.statement.context = { contextActivities: {} }),
        (this.data.statement.context.contextActivities.category = [
          {
            id:
              "http://h5p.org/libraries/" + e.libraryInfo.versionedNameNoSpaces,
            objectType: "Activity",
          },
        ])));
  }),
  (H5P.XAPIEvent.prototype.setActor = function () {
    if (void 0 !== H5PIntegration.user)
      this.data.statement.actor = {
        name: H5PIntegration.user.name,
        mbox: "mailto:" + H5PIntegration.user.mail,
        objectType: "Agent",
      };
    else {
      var t;
      try {
        localStorage.H5PUserUUID
          ? (t = localStorage.H5PUserUUID)
          : ((t = H5P.createUUID()), (localStorage.H5PUserUUID = t));
      } catch (e) {
        t = "not-trackable-" + H5P.createUUID();
      }
      this.data.statement.actor = {
        account: { name: t, homePage: H5PIntegration.siteUrl },
        objectType: "Agent",
      };
    }
  }),
  (H5P.XAPIEvent.prototype.getMaxScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "max"]);
  }),
  (H5P.XAPIEvent.prototype.getScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "raw"]);
  }),
  (H5P.XAPIEvent.prototype.getContentXAPIId = function (e) {
    var t;
    return (
      e.contentId &&
        H5PIntegration &&
        H5PIntegration.contents &&
        H5PIntegration.contents["cid-" + e.contentId] &&
        ((t = H5PIntegration.contents["cid-" + e.contentId].url),
        e.subContentId && (t += "?subContentId=" + e.subContentId)),
      t
    );
  }),
  (H5P.XAPIEvent.prototype.isFromChild = function () {
    var e = this.getVerifiedStatementValue([
      "context",
      "contextActivities",
      "parent",
      0,
      "id",
    ]);
    return !e || -1 === e.indexOf("subContentId");
  }),
  (H5P.XAPIEvent.prototype.getVerifiedStatementValue = function (e) {
    for (var t = this.data.statement, i = 0; i < e.length; i++) {
      if (void 0 === t[e[i]]) return null;
      t = t[e[i]];
    }
    return t;
  }),
  (H5P.XAPIEvent.allowedXAPIVerbs = [
    "answered",
    "asked",
    "attempted",
    "attended",
    "commented",
    "completed",
    "exited",
    "experienced",
    "failed",
    "imported",
    "initialized",
    "interacted",
    "launched",
    "mastered",
    "passed",
    "preferred",
    "progressed",
    "registered",
    "responded",
    "resumed",
    "scored",
    "shared",
    "suspended",
    "terminated",
    "voided",
    "downloaded",
    "copied",
    "accessed-reuse",
    "accessed-embed",
    "accessed-copyright",
  ]),
  ((H5P = window.H5P = window.H5P || {}).externalDispatcher =
    new H5P.EventDispatcher()),
  (H5P.EventDispatcher.prototype.triggerXAPI = function (e, t) {
    this.trigger(this.createXAPIEventTemplate(e, t));
  }),
  (H5P.EventDispatcher.prototype.createXAPIEventTemplate = function (e, t) {
    var i = new H5P.XAPIEvent();
    if ((i.setActor(), i.setVerb(e), void 0 !== t))
      for (var n in t) i.data.statement[n] = t[n];
    return (
      "object" in i.data.statement || i.setObject(this),
      "context" in i.data.statement || i.setContext(this),
      i
    );
  }),
  (H5P.EventDispatcher.prototype.triggerXAPICompleted = function (e, t, i) {
    this.triggerXAPIScored(e, t, "completed", !0, i);
  }),
  (H5P.EventDispatcher.prototype.triggerXAPIScored = function (e, t, i, n, s) {
    i = this.createXAPIEventTemplate(i);
    (i.setScoredResult(e, t, this, n, s), this.trigger(i));
  }),
  (H5P.EventDispatcher.prototype.setActivityStarted = function () {
    void 0 === this.activityStartTime &&
      (void 0 !== this.contentId &&
        void 0 !== H5PIntegration.contents &&
        void 0 !== H5PIntegration.contents["cid-" + this.contentId] &&
        this.triggerXAPI("attempted"),
      (this.activityStartTime = Date.now()));
  }),
  (H5P.xAPICompletedListener = function (e) {
    var t, i;
    ("completed" !== e.getVerb() && "answered" !== e.getVerb()) ||
      e.getVerifiedStatementValue(["context", "contextActivities", "parent"]) ||
      ((t = e.getScore()),
      (i = e.getMaxScore()),
      (e = e.getVerifiedStatementValue([
        "object",
        "definition",
        "extensions",
        "http://h5p.org/x-api/h5p-local-content-id",
      ])),
      H5P.setFinished(e, t, i));
  }) /*!@license js/h5p-content-type.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ContentType = function (e) {
    function t() {}
    return (
      ((t.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return e;
      }),
      (t.prototype.getLibraryFilePath = function (e) {
        return (
          H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + "/" + e
        );
      }),
      t
    );
  }) /*!@license js/h5p-confirmation-dialog.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ConfirmationDialog = (function (P) {
    "use strict";
    function e(i) {
      P.call(this);
      var n = this;
      H5P.ConfirmationDialog.uniqueId += 1;
      var e = H5P.ConfirmationDialog.uniqueId;
      function t(e) {
        (n.hide(), n.trigger("confirmed"), e.preventDefault());
      }
      function s(e) {
        (n.hide(), n.trigger("canceled"), e.preventDefault());
      }
      function o(e, t) {
        (e.focus(), t.preventDefault());
      }
      (((i = i || {}).headerText =
        i.headerText || H5P.t("confirmDialogHeader")),
        (i.dialogText = i.dialogText || H5P.t("confirmDialogBody")),
        (i.cancelText = i.cancelText || H5P.t("cancelLabel")),
        (i.confirmText = i.confirmText || H5P.t("confirmLabel")));
      var r = 32,
        a = 8,
        l = !1,
        h = document.createElement("div");
      h.classList.add("h5p-confirmation-dialog-background", "hidden", "hiding");
      var c = document.createElement("div");
      (c.classList.add("h5p-confirmation-dialog-popup", "hidden"),
        i.classes &&
          i.classes.forEach(function (e) {
            c.classList.add(e);
          }),
        c.setAttribute("role", "dialog"),
        c.setAttribute(
          "aria-labelledby",
          "h5p-confirmation-dialog-dialog-text-" + e,
        ),
        h.appendChild(c),
        c.addEventListener("keydown", function (e) {
          27 === e.which && s(e);
        }));
      var u = document.createElement("div");
      (u.classList.add("h5p-confirmation-dialog-header"), c.appendChild(u));
      var d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-header-text"),
        (d.innerHTML = i.headerText),
        u.appendChild(d));
      u = document.createElement("div");
      (u.classList.add("h5p-confirmation-dialog-body"), c.appendChild(u));
      d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-text"),
        (d.innerHTML = i.dialogText),
        (d.id = "h5p-confirmation-dialog-dialog-text-" + e),
        u.appendChild(d));
      d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-buttons"), u.appendChild(d));
      var p = document.createElement("button");
      (p.classList.add("h5p-core-cancel-button"),
        (p.textContent = i.cancelText));
      var f = document.createElement("button");
      (f.classList.add("h5p-core-button"),
        f.classList.add("h5p-confirmation-dialog-confirm-button"),
        (f.textContent = i.confirmText));
      var g,
        m,
        u = document.createElement("button");
      (u.classList.add("h5p-confirmation-dialog-exit"),
        u.setAttribute("aria-hidden", "true"),
        (u.tabIndex = -1),
        (u.title = i.cancelText),
        p.addEventListener("click", s),
        p.addEventListener("keydown", function (e) {
          32 === e.which ? s(e) : 9 === e.which && e.shiftKey && o(f, e);
        }),
        i.hideCancel ? d.classList.add("center") : d.appendChild(p),
        f.addEventListener("click", t),
        f.addEventListener("keydown", function (e) {
          32 === e.which
            ? t(e)
            : 9 !== e.which || e.shiftKey || o(i.hideCancel ? f : p, e);
        }),
        d.appendChild(f),
        u.addEventListener("click", s),
        u.addEventListener("keydown", function (e) {
          32 === e.which && s(e);
        }),
        i.hideExit || c.appendChild(u));
      var v,
        b = [],
        y = [];
      this.appendTo = function (e) {
        return ((g = e), this);
      };
      var _ = function (e) {
          h.contains(e.target) || (e.preventDefault(), f.focus());
        },
        w = function (e) {
          for (
            var t = [], i = e.parentNode.children, n = 0;
            n < i.length;
            n += 1
          )
            ((t[n] = !!i[n].getAttribute("aria-hidden")),
              i[n] !== e && i[n].setAttribute("aria-hidden", !0));
          return t;
        },
        x = function (e, t) {
          for (var i = e.parentNode.children, n = 0; n < i.length; n += 1)
            i[n] === e || t[n] || i[n].removeAttribute("aria-hidden");
        };
      ((this.show = function (e) {
        var t;
        return (
          (v = document.activeElement),
          g.appendChild(h),
          (m = g.parentNode || g).addEventListener("focus", _, !0),
          (b = w(g)),
          (y = w(h)),
          h.classList.remove("hidden"),
          (t = e),
          (e = parseInt(c.style.top, 10)),
          (e =
            (e = (e = void 0 !== t ? t : e) || 0) + c.offsetHeight >
            g.offsetHeight
              ? g.offsetHeight - c.offsetHeight - a
              : e) -
            r <=
            0 && ((e = r + a), (l = !0)),
          (c.style.top = e + "px"),
          setTimeout(function () {
            (c.classList.remove("hidden"),
              h.classList.remove("hiding"),
              setTimeout(function () {
                var e;
                (f.focus(),
                  l &&
                    i.instance &&
                    ((e = parseInt(c.offsetHeight, 10) + r + 2 * a),
                    n.setViewPortMinimumHeight(e),
                    i.instance.trigger("resize"),
                    (l = !1)));
              }, 100));
          }, 0),
          this
        );
      }),
        (this.hide = function () {
          return (
            h.classList.add("hiding"),
            c.classList.add("hidden"),
            m.removeAttribute("aria-hidden"),
            m.removeEventListener("focus", _, !0),
            i.skipRestoreFocus || v.focus(),
            x(g, b),
            x(h, y),
            setTimeout(function () {
              (h.classList.add("hidden"),
                g.removeChild(h),
                n.setViewPortMinimumHeight(null));
            }, 100),
            this
          );
        }),
        (this.getElement = function () {
          return c;
        }),
        (this.getPreviouslyFocused = function () {
          return v;
        }),
        (this.setViewPortMinimumHeight = function (e) {
          (
            document.querySelector(".h5p-container") || document.body
          ).style.minHeight = "number" == typeof e ? e + "px" : e;
        }));
    }
    return ((e.prototype = Object.create(P.prototype)).constructor = e);
  })(H5P.EventDispatcher)),
  (H5P.ConfirmationDialog.uniqueId =
    -1) /*!@license js/h5p-action-bar.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ActionBar = (function (i) {
    "use strict";
    function e(e) {
      i.call(this);
      function t(e, t) {
        function i() {
          n.trigger(e);
        }
        (H5P.jQuery("<li/>", {
          class: "h5p-button h5p-noselect h5p-" + (t || e),
          role: "button",
          tabindex: 0,
          title: H5P.t(e + "Description"),
          html: H5P.t(e),
          on: {
            click: i,
            keypress: function (e) {
              32 === e.which && (i(), e.preventDefault());
            },
          },
          appendTo: o,
        }),
          (s = !0));
      }
      var n = this,
        s = !1,
        o = H5P.jQuery('<ul class="h5p-actions"></ul>');
      ((e.export || e.copy) && t("reuse", "export"),
        e.copyright && t("copyrights"),
        e.embed && t("embed"),
        e.icon &&
          (H5P.jQuery(
            '<li><a class="h5p-link" href="http://h5p.org" target="_blank" title="' +
              H5P.t("h5pDescription") +
              '"></a></li>',
          ).appendTo(o),
          (s = !0)),
        (n.getDOMElement = function () {
          return o;
        }),
        (n.hasActions = function () {
          return s;
        }));
    }
    return ((e.prototype = Object.create(i.prototype)).constructor = e);
  })(
    (H5P.jQuery, H5P.EventDispatcher),
  )) /*!@license js/request-queue.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.RequestQueue = (function (i, t) {
    function e(e) {
      (t.call(this),
        (this.processingQueue = !1),
        (this.showToast = (e = e || {}).showToast),
        (this.itemName = "requestQueue"));
    }
    return (
      (e.prototype.add = function (e, t) {
        if (!window.localStorage) return !1;
        let i = this.getStoredRequests();
        return (
          (i = i || []),
          i.push({ url: e, data: t }),
          window.localStorage.setItem(this.itemName, JSON.stringify(i)),
          this.trigger("requestQueued", {
            storedStatements: i,
            processingQueue: this.processingQueue,
          }),
          !0
        );
      }),
      (e.prototype.getStoredRequests = function () {
        if (!window.localStorage) return !1;
        var e = window.localStorage.getItem(this.itemName);
        return e ? JSON.parse(e) : [];
      }),
      (e.prototype.clearQueue = function () {
        return (
          !!window.localStorage &&
          (window.localStorage.removeItem(this.itemName), !0)
        );
      }),
      (e.prototype.resumeQueue = function () {
        if (!H5PIntegration || !window.navigator || !window.localStorage)
          return !1;
        if (this.processingQueue) return !1;
        var e = this.getStoredRequests(),
          t = e.length;
        return (
          this.clearQueue(),
          t
            ? ((this.processingQueue = !0), this.processQueue(e))
            : this.trigger("emptiedQueue", e),
          !0
        );
      }),
      (e.prototype.processQueue = function (e) {
        var t;
        e.length &&
          (this.trigger("processingQueue"),
          (t = e.shift()),
          i
            .post(t.url, t.data)
            .fail(this.onQueuedRequestFail.bind(this, t))
            .always(this.onQueuedRequestProcessed.bind(this, e)));
      }),
      (e.prototype.onQueuedRequestFail = function (e) {
        window.navigator.onLine || this.add(e.url, e.data);
      }),
      (e.prototype.onQueuedRequestProcessed = function (e) {
        e.length
          ? this.processQueue(e)
          : ((this.processingQueue = !1),
            (e = this.getStoredRequests()),
            this.trigger("queueEmptied", e));
      }),
      (e.prototype.displayToastMessage = function (e, t, i) {
        (this.showToast || t) &&
          ((i = H5P.jQuery.extend(
            !0,
            {},
            {
              position: {
                horizontal: "centered",
                vertical: "centered",
                noOverflowX: !0,
              },
            },
            i,
          )),
          H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0], e, i));
      }),
      e
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  (H5P.OfflineRequestQueue = (function (_, w) {
    return function (e) {
      const i = new _();
      i.clearQueue();
      let n = null;
      const s = [10, 20, 40, 60, 120, 300, 600];
      let o = -1,
        t = null,
        r = !1,
        a = !1,
        l = !1;
      e = e.instance;
      const h = new w({
          headerText: H5P.t("offlineDialogHeader"),
          dialogText: H5P.t("offlineDialogBody"),
          confirmText: H5P.t("offlineDialogRetryButtonLabel"),
          hideCancel: !0,
          hideExit: !0,
          classes: ["offline"],
          instance: e,
          skipRestoreFocus: !0,
        }),
        c = h.getElement(),
        u = document.createElement("div");
      (u.classList.add("count-down"),
        (u.innerHTML = H5P.t("offlineDialogRetryMessage").replace(
          ":num",
          '<span class="count-down-num">0</span>',
        )),
        c.querySelector(".h5p-confirmation-dialog-text").appendChild(u));
      const d = u.querySelector(".count-down-num"),
        p = document.createElement("div");
      p.classList.add("throbber-wrapper");
      const f = document.createElement("div");
      (f.classList.add("sending-requests-throbber"),
        p.appendChild(f),
        i.on(
          "requestQueued",
          function (e) {
            if (!e.data || !e.data.processingQueue) {
              if (!r) {
                const t = document.body.querySelector(".h5p-content");
                if (!t) return;
                (h.appendTo(t), t.appendChild(p), (r = !0));
              }
              b();
            }
          }.bind(this),
        ),
        i.on(
          "queueEmptied",
          function (e) {
            e.data && e.data.length
              ? b(!0)
              : (clearInterval(t),
                g(!1),
                (o = -1),
                a && (h.hide(), (a = !1)),
                i.displayToastMessage(H5P.t("offlineSuccessfulSubmit"), !0, {
                  position: { vertical: "top", offsetVertical: "100" },
                }));
          }.bind(this),
        ),
        h.on(
          "confirmed",
          function () {
            ((a = !1),
              setTimeout(function () {
                m();
              }, 100));
          }.bind(this),
        ),
        window.addEventListener(
          "online",
          function () {
            m();
          }.bind(this),
        ),
        window.addEventListener(
          "message",
          function (e) {
            window.parent === e.source &&
              "h5p" === e.data.context &&
              "queueRequest" === e.data.action &&
              this.add(e.data.url, e.data.data);
          }.bind(this),
        ));
      const g = function (e) {
          ((l = !l),
            void 0 !== e && (l = e),
            l && a && (h.hide(), (a = !1)),
            l ? p.classList.add("show") : p.classList.remove("show"));
        },
        m = function () {
          (clearInterval(t), g(!0), i.resumeQueue());
        },
        v = function () {
          ((o += 1), o >= s.length && (o = s.length - 1));
        },
        b = function (e) {
          a ||
            (g(!1),
            a ||
              (e
                ? setTimeout(function () {
                    h.show(0);
                  }, 100)
                : h.show(0)),
            (a = !0),
            (n = new Date().getTime()),
            v(),
            clearInterval(t),
            (t = setInterval(y, 100)));
        },
        y = function () {
          var e = new Date().getTime(),
            e = Math.floor((e - n) / 1e3);
          const t = s[o] - e;
          ((d.textContent = t.toString()), t <= 0 && m());
        };
      this.add = function (e, t) {
        if (window.navigator.onLine) return !1;
        i.add(e, t);
      };
    };
  })(H5P.RequestQueue, H5P.ConfirmationDialog)),
  (function (n) {
    ((H5P.Image = function (e, t, i) {
      (H5P.EventDispatcher.call(this),
        (this.extras = i),
        void 0 !== e.file && e.file instanceof Object
          ? ((this.source = H5P.getPath(e.file.path, t)),
            (this.width = e.file.width),
            (this.height = e.file.height))
          : (this.placeholder = !0),
        (this.alt =
          e.decorative || void 0 === e.alt
            ? ""
            : this.stripHTML(this.htmlDecode(e.alt))),
        void 0 !== e.title &&
          (this.title = this.stripHTML(this.htmlDecode(e.title))));
    }),
      (H5P.Image.prototype = Object.create(H5P.EventDispatcher.prototype)),
      (H5P.Image.prototype.constructor = H5P.Image),
      (H5P.Image.prototype.attach = function (e) {
        var t = this,
          i = this.source;
        (void 0 === t.$img &&
          (t.placeholder
            ? (t.$img = n("<div>", {
                width: "100%",
                height: "100%",
                class: "h5p-placeholder",
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))
            : (t.$img = n("<img>", {
                width: "100%",
                height: "100%",
                src: i,
                alt: this.alt,
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))),
          e.addClass("h5p-image").html(t.$img));
      }),
      (H5P.Image.prototype.htmlDecode = function (e) {
        return new DOMParser().parseFromString(e, "text/html").documentElement
          .textContent;
      }),
      (H5P.Image.prototype.stripHTML = function (e) {
        const t = document.createElement("div");
        return ((t.innerHTML = e), t.textContent || t.innerText || "");
      }),
      H5P.Image);
  })((H5P = H5P || {}).jQuery),
  /*!@license H5P.AdvancedText-1.1/text.js by Joubel licensed under unknown license*/ (H5P.AdvancedText =
    (function (n) {
      function e(e, t) {
        n.call(this);
        var i = void 0 === e.text ? "<em>New text</em>" : e.text;
        this.attach = function (e) {
          e.addClass("h5p-advanced-text").html(i);
        };
      }
      return ((e.prototype = Object.create(n.prototype)).constructor = e);
    })((H5P.jQuery, H5P.EventDispatcher))));
/*!@license jQuery.ui-1.10/h5p-jquery-ui.js by Jupiter licensed under MIT*/ var oldJQuery =
    jQuery,
  jQuery = H5P.jQuery;
(!(function (e) {
  "use strict";
  "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery);
})(function (Y) {
  "use strict";
  Y.ui = Y.ui || {};
  Y.ui.version = "1.13.0";
  var s,
    i = 0,
    r = Array.prototype.hasOwnProperty,
    a = Array.prototype.slice;
  ((Y.cleanData =
    ((s = Y.cleanData),
    function (e) {
      for (var t, i, n = 0; null != (i = e[n]); n++)
        (t = Y._data(i, "events")) && t.remove && Y(i).triggerHandler("remove");
      s(e);
    })),
    (Y.widget = function (e, i, t) {
      var n,
        s,
        o,
        r = {},
        a = e.split(".")[0],
        l = a + "-" + (e = e.split(".")[1]);
      return (
        t || ((t = i), (i = Y.Widget)),
        Array.isArray(t) && (t = Y.extend.apply(null, [{}].concat(t))),
        (Y.expr.pseudos[l.toLowerCase()] = function (e) {
          return !!Y.data(e, l);
        }),
        (Y[a] = Y[a] || {}),
        (n = Y[a][e]),
        (s = Y[a][e] =
          function (e, t) {
            if (!this._createWidget) return new s(e, t);
            arguments.length && this._createWidget(e, t);
          }),
        Y.extend(s, n, {
          version: t.version,
          _proto: Y.extend({}, t),
          _childConstructors: [],
        }),
        ((o = new i()).options = Y.widget.extend({}, o.options)),
        Y.each(t, function (t, n) {
          function s() {
            return i.prototype[t].apply(this, arguments);
          }
          function o(e) {
            return i.prototype[t].apply(this, e);
          }
          r[t] =
            "function" == typeof n
              ? function () {
                  var e,
                    t = this._super,
                    i = this._superApply;
                  return (
                    (this._super = s),
                    (this._superApply = o),
                    (e = n.apply(this, arguments)),
                    (this._super = t),
                    (this._superApply = i),
                    e
                  );
                }
              : n;
        }),
        (s.prototype = Y.widget.extend(
          o,
          { widgetEventPrefix: (n && o.widgetEventPrefix) || e },
          r,
          { constructor: s, namespace: a, widgetName: e, widgetFullName: l },
        )),
        n
          ? (Y.each(n._childConstructors, function (e, t) {
              var i = t.prototype;
              Y.widget(i.namespace + "." + i.widgetName, s, t._proto);
            }),
            delete n._childConstructors)
          : i._childConstructors.push(s),
        Y.widget.bridge(e, s),
        s
      );
    }),
    (Y.widget.extend = function (e) {
      for (var t, i, n = a.call(arguments, 1), s = 0, o = n.length; s < o; s++)
        for (t in n[s])
          ((i = n[s][t]),
            r.call(n[s], t) &&
              void 0 !== i &&
              (Y.isPlainObject(i)
                ? (e[t] = Y.isPlainObject(e[t])
                    ? Y.widget.extend({}, e[t], i)
                    : Y.widget.extend({}, i))
                : (e[t] = i)));
      return e;
    }),
    (Y.widget.bridge = function (o, t) {
      var r = t.prototype.widgetFullName || o;
      Y.fn[o] = function (i) {
        var e = "string" == typeof i,
          n = a.call(arguments, 1),
          s = this;
        return (
          e
            ? this.length || "instance" !== i
              ? this.each(function () {
                  var e,
                    t = Y.data(this, r);
                  return "instance" === i
                    ? ((s = t), !1)
                    : t
                      ? "function" != typeof t[i] || "_" === i.charAt(0)
                        ? Y.error(
                            "no such method '" +
                              i +
                              "' for " +
                              o +
                              " widget instance",
                          )
                        : (e = t[i].apply(t, n)) !== t && void 0 !== e
                          ? ((s = e && e.jquery ? s.pushStack(e.get()) : e), !1)
                          : void 0
                      : Y.error(
                          "cannot call methods on " +
                            o +
                            " prior to initialization; attempted to call method '" +
                            i +
                            "'",
                        );
                })
              : (s = void 0)
            : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
              this.each(function () {
                var e = Y.data(this, r);
                e
                  ? (e.option(i || {}), e._init && e._init())
                  : Y.data(this, r, new t(i, this));
              })),
          s
        );
      };
    }),
    (Y.Widget = function () {}),
    (Y.Widget._childConstructors = []),
    (Y.Widget.prototype = {
      widgetName: "widget",
      widgetEventPrefix: "",
      defaultElement: "<div>",
      options: { classes: {}, disabled: !1, create: null },
      _createWidget: function (e, t) {
        ((t = Y(t || this.defaultElement || this)[0]),
          (this.element = Y(t)),
          (this.uuid = i++),
          (this.eventNamespace = "." + this.widgetName + this.uuid),
          (this.bindings = Y()),
          (this.hoverable = Y()),
          (this.focusable = Y()),
          (this.classesElementLookup = {}),
          t !== this &&
            (Y.data(t, this.widgetFullName, this),
            this._on(!0, this.element, {
              remove: function (e) {
                e.target === t && this.destroy();
              },
            }),
            (this.document = Y(t.style ? t.ownerDocument : t.document || t)),
            (this.window = Y(
              this.document[0].defaultView || this.document[0].parentWindow,
            ))),
          (this.options = Y.widget.extend(
            {},
            this.options,
            this._getCreateOptions(),
            e,
          )),
          this._create(),
          this.options.disabled &&
            this._setOptionDisabled(this.options.disabled),
          this._trigger("create", null, this._getCreateEventData()),
          this._init());
      },
      _getCreateOptions: function () {
        return {};
      },
      _getCreateEventData: Y.noop,
      _create: Y.noop,
      _init: Y.noop,
      destroy: function () {
        var i = this;
        (this._destroy(),
          Y.each(this.classesElementLookup, function (e, t) {
            i._removeClass(t, e);
          }),
          this.element.off(this.eventNamespace).removeData(this.widgetFullName),
          this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
          this.bindings.off(this.eventNamespace));
      },
      _destroy: Y.noop,
      widget: function () {
        return this.element;
      },
      option: function (e, t) {
        var i,
          n,
          s,
          o = e;
        if (0 === arguments.length) return Y.widget.extend({}, this.options);
        if ("string" == typeof e)
          if (((o = {}), (e = (i = e.split(".")).shift()), i.length)) {
            for (
              n = o[e] = Y.widget.extend({}, this.options[e]), s = 0;
              s < i.length - 1;
              s++
            )
              ((n[i[s]] = n[i[s]] || {}), (n = n[i[s]]));
            if (((e = i.pop()), 1 === arguments.length))
              return void 0 === n[e] ? null : n[e];
            n[e] = t;
          } else {
            if (1 === arguments.length)
              return void 0 === this.options[e] ? null : this.options[e];
            o[e] = t;
          }
        return (this._setOptions(o), this);
      },
      _setOptions: function (e) {
        for (var t in e) this._setOption(t, e[t]);
        return this;
      },
      _setOption: function (e, t) {
        return (
          "classes" === e && this._setOptionClasses(t),
          (this.options[e] = t),
          "disabled" === e && this._setOptionDisabled(t),
          this
        );
      },
      _setOptionClasses: function (e) {
        var t, i, n;
        for (t in e)
          ((n = this.classesElementLookup[t]),
            e[t] !== this.options.classes[t] &&
              n &&
              n.length &&
              ((i = Y(n.get())),
              this._removeClass(n, t),
              i.addClass(
                this._classes({ element: i, keys: t, classes: e, add: !0 }),
              )));
      },
      _setOptionDisabled: function (e) {
        (this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !!e,
        ),
          e &&
            (this._removeClass(this.hoverable, null, "ui-state-hover"),
            this._removeClass(this.focusable, null, "ui-state-focus")));
      },
      enable: function () {
        return this._setOptions({ disabled: !1 });
      },
      disable: function () {
        return this._setOptions({ disabled: !0 });
      },
      _classes: function (s) {
        var o = [],
          r = this;
        function e(e, t) {
          for (var i, n = 0; n < e.length; n++)
            ((i = r.classesElementLookup[e[n]] || Y()),
              (i = s.add
                ? (s.element.each(function (e, t) {
                    Y.map(r.classesElementLookup, function (e) {
                      return e;
                    }).some(function (e) {
                      return e.is(t);
                    }) || r._on(Y(t), { remove: "_untrackClassesElement" });
                  }),
                  Y(Y.uniqueSort(i.get().concat(s.element.get()))))
                : Y(i.not(s.element).get())),
              (r.classesElementLookup[e[n]] = i),
              o.push(e[n]),
              t && s.classes[e[n]] && o.push(s.classes[e[n]]));
        }
        return (
          (s = Y.extend(
            { element: this.element, classes: this.options.classes || {} },
            s,
          )).keys && e(s.keys.match(/\S+/g) || [], !0),
          s.extra && e(s.extra.match(/\S+/g) || []),
          o.join(" ")
        );
      },
      _untrackClassesElement: function (i) {
        var n = this;
        (Y.each(n.classesElementLookup, function (e, t) {
          -1 !== Y.inArray(i.target, t) &&
            (n.classesElementLookup[e] = Y(t.not(i.target).get()));
        }),
          this._off(Y(i.target)));
      },
      _removeClass: function (e, t, i) {
        return this._toggleClass(e, t, i, !1);
      },
      _addClass: function (e, t, i) {
        return this._toggleClass(e, t, i, !0);
      },
      _toggleClass: function (e, t, i, n) {
        var s = "string" == typeof e || null === e,
          i = {
            extra: s ? t : i,
            keys: s ? e : t,
            element: s ? this.element : e,
            add: (n = "boolean" == typeof n ? n : i),
          };
        return (i.element.toggleClass(this._classes(i), n), this);
      },
      _on: function (s, o, e) {
        var r,
          a = this;
        ("boolean" != typeof s && ((e = o), (o = s), (s = !1)),
          e
            ? ((o = r = Y(o)), (this.bindings = this.bindings.add(o)))
            : ((e = o), (o = this.element), (r = this.widget())),
          Y.each(e, function (e, t) {
            function i() {
              if (
                s ||
                (!0 !== a.options.disabled &&
                  !Y(this).hasClass("ui-state-disabled"))
              )
                return ("string" == typeof t ? a[t] : t).apply(a, arguments);
            }
            "string" != typeof t &&
              (i.guid = t.guid = t.guid || i.guid || Y.guid++);
            var n = e.match(/^([\w:-]*)\s*(.*)$/),
              e = n[1] + a.eventNamespace,
              n = n[2];
            n ? r.on(e, n, i) : o.on(e, i);
          }));
      },
      _off: function (e, t) {
        ((t =
          (t || "").split(" ").join(this.eventNamespace + " ") +
          this.eventNamespace),
          e.off(t),
          (this.bindings = Y(this.bindings.not(e).get())),
          (this.focusable = Y(this.focusable.not(e).get())),
          (this.hoverable = Y(this.hoverable.not(e).get())));
      },
      _delay: function (e, t) {
        var i = this;
        return setTimeout(function () {
          return ("string" == typeof e ? i[e] : e).apply(i, arguments);
        }, t || 0);
      },
      _hoverable: function (e) {
        ((this.hoverable = this.hoverable.add(e)),
          this._on(e, {
            mouseenter: function (e) {
              this._addClass(Y(e.currentTarget), null, "ui-state-hover");
            },
            mouseleave: function (e) {
              this._removeClass(Y(e.currentTarget), null, "ui-state-hover");
            },
          }));
      },
      _focusable: function (e) {
        ((this.focusable = this.focusable.add(e)),
          this._on(e, {
            focusin: function (e) {
              this._addClass(Y(e.currentTarget), null, "ui-state-focus");
            },
            focusout: function (e) {
              this._removeClass(Y(e.currentTarget), null, "ui-state-focus");
            },
          }));
      },
      _trigger: function (e, t, i) {
        var n,
          s,
          o = this.options[e];
        if (
          ((i = i || {}),
          ((t = Y.Event(t)).type = (
            e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e
          ).toLowerCase()),
          (t.target = this.element[0]),
          (s = t.originalEvent))
        )
          for (n in s) n in t || (t[n] = s[n]);
        return (
          this.element.trigger(t, i),
          !(
            ("function" == typeof o &&
              !1 === o.apply(this.element[0], [t].concat(i))) ||
            t.isDefaultPrevented()
          )
        );
      },
    }),
    Y.each({ show: "fadeIn", hide: "fadeOut" }, function (o, r) {
      Y.Widget.prototype["_" + o] = function (t, e, i) {
        var n,
          s = (e = "string" == typeof e ? { effect: e } : e)
            ? (!0 !== e && "number" != typeof e && e.effect) || r
            : o;
        ("number" == typeof (e = e || {})
          ? (e = { duration: e })
          : !0 === e && (e = {}),
          (n = !Y.isEmptyObject(e)),
          (e.complete = i),
          e.delay && t.delay(e.delay),
          n && Y.effects && Y.effects.effect[s]
            ? t[o](e)
            : s !== o && t[s]
              ? t[s](e.duration, e.easing, i)
              : t.queue(function (e) {
                  (Y(this)[o](), i && i.call(t[0]), e());
                }));
      };
    }));
  var n, x, P, o, l, h, c, u, C;
  Y.widget;
  function k(e, t, i) {
    return [
      parseFloat(e[0]) * (u.test(e[0]) ? t / 100 : 1),
      parseFloat(e[1]) * (u.test(e[1]) ? i / 100 : 1),
    ];
  }
  function T(e, t) {
    return parseInt(Y.css(e, t), 10) || 0;
  }
  function H(e) {
    return null != e && e === e.window;
  }
  ((x = Math.max),
    (P = Math.abs),
    (o = /left|center|right/),
    (l = /top|center|bottom/),
    (h = /[\+\-]\d+(\.[\d]+)?%?/),
    (c = /^\w+/),
    (u = /%$/),
    (C = Y.fn.position),
    (Y.position = {
      scrollbarWidth: function () {
        if (void 0 !== n) return n;
        var e,
          t = Y(
            "<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>",
          ),
          i = t.children()[0];
        return (
          Y("body").append(t),
          (e = i.offsetWidth),
          t.css("overflow", "scroll"),
          e === (i = i.offsetWidth) && (i = t[0].clientWidth),
          t.remove(),
          (n = e - i)
        );
      },
      getScrollInfo: function (e) {
        var t = e.isWindow || e.isDocument ? "" : e.element.css("overflow-x"),
          i = e.isWindow || e.isDocument ? "" : e.element.css("overflow-y"),
          t =
            "scroll" === t ||
            ("auto" === t && e.width < e.element[0].scrollWidth);
        return {
          width:
            "scroll" === i ||
            ("auto" === i && e.height < e.element[0].scrollHeight)
              ? Y.position.scrollbarWidth()
              : 0,
          height: t ? Y.position.scrollbarWidth() : 0,
        };
      },
      getWithinInfo: function (e) {
        var t = Y(e || window),
          i = H(t[0]),
          n = !!t[0] && 9 === t[0].nodeType;
        return {
          element: t,
          isWindow: i,
          isDocument: n,
          offset: !i && !n ? Y(e).offset() : { left: 0, top: 0 },
          scrollLeft: t.scrollLeft(),
          scrollTop: t.scrollTop(),
          width: t.outerWidth(),
          height: t.outerHeight(),
        };
      },
    }),
    (Y.fn.position = function (u) {
      if (!u || !u.of) return C.apply(this, arguments);
      var d,
        p,
        f,
        g,
        m,
        e,
        v =
          "string" == typeof (u = Y.extend({}, u)).of
            ? Y(document).find(u.of)
            : Y(u.of),
        b = Y.position.getWithinInfo(u.within),
        y = Y.position.getScrollInfo(b),
        _ = (u.collision || "flip").split(" "),
        w = {},
        t =
          9 === (e = (t = v)[0]).nodeType
            ? {
                width: t.width(),
                height: t.height(),
                offset: { top: 0, left: 0 },
              }
            : H(e)
              ? {
                  width: t.width(),
                  height: t.height(),
                  offset: { top: t.scrollTop(), left: t.scrollLeft() },
                }
              : e.preventDefault
                ? {
                    width: 0,
                    height: 0,
                    offset: { top: e.pageY, left: e.pageX },
                  }
                : {
                    width: t.outerWidth(),
                    height: t.outerHeight(),
                    offset: t.offset(),
                  };
      return (
        v[0].preventDefault && (u.at = "left top"),
        (p = t.width),
        (f = t.height),
        (m = Y.extend({}, (g = t.offset))),
        Y.each(["my", "at"], function () {
          var e,
            t,
            i = (u[this] || "").split(" ");
          (((i =
            1 === i.length
              ? o.test(i[0])
                ? i.concat(["center"])
                : l.test(i[0])
                  ? ["center"].concat(i)
                  : ["center", "center"]
              : i)[0] = o.test(i[0]) ? i[0] : "center"),
            (i[1] = l.test(i[1]) ? i[1] : "center"),
            (e = h.exec(i[0])),
            (t = h.exec(i[1])),
            (w[this] = [e ? e[0] : 0, t ? t[0] : 0]),
            (u[this] = [c.exec(i[0])[0], c.exec(i[1])[0]]));
        }),
        1 === _.length && (_[1] = _[0]),
        "right" === u.at[0]
          ? (m.left += p)
          : "center" === u.at[0] && (m.left += p / 2),
        "bottom" === u.at[1]
          ? (m.top += f)
          : "center" === u.at[1] && (m.top += f / 2),
        (d = k(w.at, p, f)),
        (m.left += d[0]),
        (m.top += d[1]),
        this.each(function () {
          var i,
            e,
            r = Y(this),
            a = r.outerWidth(),
            l = r.outerHeight(),
            t = T(this, "marginLeft"),
            n = T(this, "marginTop"),
            s = a + t + T(this, "marginRight") + y.width,
            o = l + n + T(this, "marginBottom") + y.height,
            h = Y.extend({}, m),
            c = k(w.my, r.outerWidth(), r.outerHeight());
          ("right" === u.my[0]
            ? (h.left -= a)
            : "center" === u.my[0] && (h.left -= a / 2),
            "bottom" === u.my[1]
              ? (h.top -= l)
              : "center" === u.my[1] && (h.top -= l / 2),
            (h.left += c[0]),
            (h.top += c[1]),
            (i = { marginLeft: t, marginTop: n }),
            Y.each(["left", "top"], function (e, t) {
              Y.ui.position[_[e]] &&
                Y.ui.position[_[e]][t](h, {
                  targetWidth: p,
                  targetHeight: f,
                  elemWidth: a,
                  elemHeight: l,
                  collisionPosition: i,
                  collisionWidth: s,
                  collisionHeight: o,
                  offset: [d[0] + c[0], d[1] + c[1]],
                  my: u.my,
                  at: u.at,
                  within: b,
                  elem: r,
                });
            }),
            u.using &&
              (e = function (e) {
                var t = g.left - h.left,
                  i = t + p - a,
                  n = g.top - h.top,
                  s = n + f - l,
                  o = {
                    target: {
                      element: v,
                      left: g.left,
                      top: g.top,
                      width: p,
                      height: f,
                    },
                    element: {
                      element: r,
                      left: h.left,
                      top: h.top,
                      width: a,
                      height: l,
                    },
                    horizontal: i < 0 ? "left" : 0 < t ? "right" : "center",
                    vertical: s < 0 ? "top" : 0 < n ? "bottom" : "middle",
                  };
                (p < a && P(t + i) < p && (o.horizontal = "center"),
                  f < l && P(n + s) < f && (o.vertical = "middle"),
                  x(P(t), P(i)) > x(P(n), P(s))
                    ? (o.important = "horizontal")
                    : (o.important = "vertical"),
                  u.using.call(this, e, o));
              }),
            r.offset(Y.extend(h, { using: e })));
        })
      );
    }),
    (Y.ui.position = {
      fit: {
        left: function (e, t) {
          var i = t.within,
            n = i.isWindow ? i.scrollLeft : i.offset.left,
            s = i.width,
            o = e.left - t.collisionPosition.marginLeft,
            r = n - o,
            a = o + t.collisionWidth - s - n;
          t.collisionWidth > s
            ? 0 < r && a <= 0
              ? ((i = e.left + r + t.collisionWidth - s - n), (e.left += r - i))
              : (e.left =
                  !(0 < a && r <= 0) && a < r ? n + s - t.collisionWidth : n)
            : 0 < r
              ? (e.left += r)
              : 0 < a
                ? (e.left -= a)
                : (e.left = x(e.left - o, e.left));
        },
        top: function (e, t) {
          var i = t.within,
            n = i.isWindow ? i.scrollTop : i.offset.top,
            s = t.within.height,
            o = e.top - t.collisionPosition.marginTop,
            r = n - o,
            a = o + t.collisionHeight - s - n;
          t.collisionHeight > s
            ? 0 < r && a <= 0
              ? ((i = e.top + r + t.collisionHeight - s - n), (e.top += r - i))
              : (e.top =
                  !(0 < a && r <= 0) && a < r ? n + s - t.collisionHeight : n)
            : 0 < r
              ? (e.top += r)
              : 0 < a
                ? (e.top -= a)
                : (e.top = x(e.top - o, e.top));
        },
      },
      flip: {
        left: function (e, t) {
          var i = t.within,
            n = i.offset.left + i.scrollLeft,
            s = i.width,
            o = i.isWindow ? i.scrollLeft : i.offset.left,
            r = e.left - t.collisionPosition.marginLeft,
            a = r - o,
            l = r + t.collisionWidth - s - o,
            h =
              "left" === t.my[0]
                ? -t.elemWidth
                : "right" === t.my[0]
                  ? t.elemWidth
                  : 0,
            i =
              "left" === t.at[0]
                ? t.targetWidth
                : "right" === t.at[0]
                  ? -t.targetWidth
                  : 0,
            r = -2 * t.offset[0];
          a < 0
            ? ((n = e.left + h + i + r + t.collisionWidth - s - n) < 0 ||
                n < P(a)) &&
              (e.left += h + i + r)
            : 0 < l &&
              (0 <
                (o = e.left - t.collisionPosition.marginLeft + h + i + r - o) ||
                P(o) < l) &&
              (e.left += h + i + r);
        },
        top: function (e, t) {
          var i = t.within,
            n = i.offset.top + i.scrollTop,
            s = i.height,
            o = i.isWindow ? i.scrollTop : i.offset.top,
            r = e.top - t.collisionPosition.marginTop,
            a = r - o,
            l = r + t.collisionHeight - s - o,
            h =
              "top" === t.my[1]
                ? -t.elemHeight
                : "bottom" === t.my[1]
                  ? t.elemHeight
                  : 0,
            i =
              "top" === t.at[1]
                ? t.targetHeight
                : "bottom" === t.at[1]
                  ? -t.targetHeight
                  : 0,
            r = -2 * t.offset[1];
          a < 0
            ? ((n = e.top + h + i + r + t.collisionHeight - s - n) < 0 ||
                n < P(a)) &&
              (e.top += h + i + r)
            : 0 < l &&
              (0 <
                (o = e.top - t.collisionPosition.marginTop + h + i + r - o) ||
                P(o) < l) &&
              (e.top += h + i + r);
        },
      },
      flipfit: {
        left: function () {
          (Y.ui.position.flip.left.apply(this, arguments),
            Y.ui.position.fit.left.apply(this, arguments));
        },
        top: function () {
          (Y.ui.position.flip.top.apply(this, arguments),
            Y.ui.position.fit.top.apply(this, arguments));
        },
      },
    }));
  (Y.ui.position,
    Y.extend(Y.expr.pseudos, {
      data: Y.expr.createPseudo
        ? Y.expr.createPseudo(function (t) {
            return function (e) {
              return !!Y.data(e, t);
            };
          })
        : function (e, t, i) {
            return !!Y.data(e, i[3]);
          },
    }),
    Y.fn.extend({
      disableSelection:
        ((e =
          "onselectstart" in document.createElement("div")
            ? "selectstart"
            : "mousedown"),
        function () {
          return this.on(e + ".ui-disableSelection", function (e) {
            e.preventDefault();
          });
        }),
      enableSelection: function () {
        return this.off(".ui-disableSelection");
      },
    }));
  var e,
    d = Y,
    p = {},
    t = p.toString,
    f = /^([\-+])=\s*(\d+\.?\d*)/,
    g = [
      {
        re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (e) {
          return [e[1], e[2], e[3], e[4]];
        },
      },
      {
        re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (e) {
          return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]];
        },
      },
      {
        re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
        parse: function (e) {
          return [
            parseInt(e[1], 16),
            parseInt(e[2], 16),
            parseInt(e[3], 16),
            e[4] ? (parseInt(e[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
        parse: function (e) {
          return [
            parseInt(e[1] + e[1], 16),
            parseInt(e[2] + e[2], 16),
            parseInt(e[3] + e[3], 16),
            e[4] ? (parseInt(e[4] + e[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        space: "hsla",
        parse: function (e) {
          return [e[1], e[2] / 100, e[3] / 100, e[4]];
        },
      },
    ],
    m = (d.Color = function (e, t, i, n) {
      return new d.Color.fn.parse(e, t, i, n);
    }),
    v = {
      rgba: {
        props: {
          red: { idx: 0, type: "byte" },
          green: { idx: 1, type: "byte" },
          blue: { idx: 2, type: "byte" },
        },
      },
      hsla: {
        props: {
          hue: { idx: 0, type: "degrees" },
          saturation: { idx: 1, type: "percent" },
          lightness: { idx: 2, type: "percent" },
        },
      },
    },
    b = {
      byte: { floor: !0, max: 255 },
      percent: { max: 1 },
      degrees: { mod: 360, floor: !0 },
    },
    y = (m.support = {}),
    _ = d("<p>")[0],
    w = d.each;
  function D(e) {
    return null == e
      ? e + ""
      : "object" == typeof e
        ? p[t.call(e)] || "object"
        : typeof e;
  }
  function I(e, t, i) {
    var n = b[t.type] || {};
    return null == e
      ? i || !t.def
        ? null
        : t.def
      : ((e = n.floor ? ~~e : parseFloat(e)),
        isNaN(e)
          ? t.def
          : n.mod
            ? (e + n.mod) % n.mod
            : Math.min(n.max, Math.max(0, e)));
  }
  function S(n) {
    var s = m(),
      o = (s._rgba = []);
    return (
      (n = n.toLowerCase()),
      w(g, function (e, t) {
        var i = t.re.exec(n),
          i = i && t.parse(i),
          t = t.space || "rgba";
        if (i)
          return (
            (i = s[t](i)),
            (s[v[t].cache] = i[v[t].cache]),
            (o = s._rgba = i._rgba),
            !1
          );
      }),
      o.length
        ? ("0,0,0,0" === o.join() && d.extend(o, q.transparent), s)
        : q[n]
    );
  }
  function E(e, t, i) {
    return 6 * (i = (i + 1) % 1) < 1
      ? e + (t - e) * i * 6
      : 2 * i < 1
        ? t
        : 3 * i < 2
          ? e + (t - e) * (2 / 3 - i) * 6
          : e;
  }
  ((_.style.cssText = "background-color:rgba(1,1,1,.5)"),
    (y.rgba = -1 < _.style.backgroundColor.indexOf("rgba")),
    w(v, function (e, t) {
      ((t.cache = "_" + e),
        (t.props.alpha = { idx: 3, type: "percent", def: 1 }));
    }),
    d.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (e, t) {
        p["[object " + t + "]"] = t.toLowerCase();
      },
    ),
    ((m.fn = d.extend(m.prototype, {
      parse: function (s, e, t, i) {
        if (void 0 === s)
          return ((this._rgba = [null, null, null, null]), this);
        (s.jquery || s.nodeType) && ((s = d(s).css(e)), (e = void 0));
        var o = this,
          n = D(s),
          r = (this._rgba = []);
        return (
          void 0 !== e && ((s = [s, e, t, i]), (n = "array")),
          "string" === n
            ? this.parse(S(s) || q._default)
            : "array" === n
              ? (w(v.rgba.props, function (e, t) {
                  r[t.idx] = I(s[t.idx], t);
                }),
                this)
              : "object" === n
                ? (w(
                    v,
                    s instanceof m
                      ? function (e, t) {
                          s[t.cache] && (o[t.cache] = s[t.cache].slice());
                        }
                      : function (e, i) {
                          var n = i.cache;
                          (w(i.props, function (e, t) {
                            if (!o[n] && i.to) {
                              if ("alpha" === e || null == s[e]) return;
                              o[n] = i.to(o._rgba);
                            }
                            o[n][t.idx] = I(s[e], t, !0);
                          }),
                            o[n] &&
                              d.inArray(null, o[n].slice(0, 3)) < 0 &&
                              (null == o[n][3] && (o[n][3] = 1),
                              i.from && (o._rgba = i.from(o[n]))));
                        },
                  ),
                  this)
                : void 0
        );
      },
      is: function (e) {
        var s = m(e),
          o = !0,
          r = this;
        return (
          w(v, function (e, t) {
            var i,
              n = s[t.cache];
            return (
              n &&
                ((i = r[t.cache] || (t.to && t.to(r._rgba)) || []),
                w(t.props, function (e, t) {
                  if (null != n[t.idx]) return (o = n[t.idx] === i[t.idx]);
                })),
              o
            );
          }),
          o
        );
      },
      _space: function () {
        var i = [],
          n = this;
        return (
          w(v, function (e, t) {
            n[t.cache] && i.push(e);
          }),
          i.pop()
        );
      },
      transition: function (e, r) {
        var t = (h = m(e))._space(),
          i = v[t],
          e = 0 === this.alpha() ? m("transparent") : this,
          a = e[i.cache] || i.to(e._rgba),
          l = a.slice(),
          h = h[i.cache];
        return (
          w(i.props, function (e, t) {
            var i = t.idx,
              n = a[i],
              s = h[i],
              o = b[t.type] || {};
            null !== s &&
              (null === n
                ? (l[i] = s)
                : (o.mod &&
                    (s - n > o.mod / 2
                      ? (n += o.mod)
                      : n - s > o.mod / 2 && (n -= o.mod)),
                  (l[i] = I((s - n) * r + n, t))));
          }),
          this[t](l)
        );
      },
      blend: function (e) {
        if (1 === this._rgba[3]) return this;
        var t = this._rgba.slice(),
          i = t.pop(),
          n = m(e)._rgba;
        return m(
          d.map(t, function (e, t) {
            return (1 - i) * n[t] + i * e;
          }),
        );
      },
      toRgbaString: function () {
        var e = "rgba(",
          t = d.map(this._rgba, function (e, t) {
            return null != e ? e : 2 < t ? 1 : 0;
          });
        return (1 === t[3] && (t.pop(), (e = "rgb(")), e + t.join() + ")");
      },
      toHslaString: function () {
        var e = "hsla(",
          t = d.map(this.hsla(), function (e, t) {
            return (
              null == e && (e = 2 < t ? 1 : 0),
              (e = t && t < 3 ? Math.round(100 * e) + "%" : e)
            );
          });
        return (1 === t[3] && (t.pop(), (e = "hsl(")), e + t.join() + ")");
      },
      toHexString: function (e) {
        var t = this._rgba.slice(),
          i = t.pop();
        return (
          e && t.push(~~(255 * i)),
          "#" +
            d
              .map(t, function (e) {
                return 1 === (e = (e || 0).toString(16)).length ? "0" + e : e;
              })
              .join("")
        );
      },
      toString: function () {
        return 0 === this._rgba[3] ? "transparent" : this.toRgbaString();
      },
    })).parse.prototype = m.fn),
    (v.hsla.to = function (e) {
      if (null == e[0] || null == e[1] || null == e[2])
        return [null, null, null, e[3]];
      var t = e[0] / 255,
        i = e[1] / 255,
        n = e[2] / 255,
        s = e[3],
        o = Math.max(t, i, n),
        r = Math.min(t, i, n),
        a = o - r,
        l = o + r,
        e = 0.5 * l,
        i =
          r === o
            ? 0
            : t === o
              ? (60 * (i - n)) / a + 360
              : i === o
                ? (60 * (n - t)) / a + 120
                : (60 * (t - i)) / a + 240,
        l = 0 == a ? 0 : e <= 0.5 ? a / l : a / (2 - l);
      return [Math.round(i) % 360, l, e, null == s ? 1 : s];
    }),
    (v.hsla.from = function (e) {
      if (null == e[0] || null == e[1] || null == e[2])
        return [null, null, null, e[3]];
      var t = e[0] / 360,
        i = e[1],
        n = e[2],
        e = e[3],
        i = n <= 0.5 ? n * (1 + i) : n + i - n * i,
        n = 2 * n - i;
      return [
        Math.round(255 * E(n, i, t + 1 / 3)),
        Math.round(255 * E(n, i, t)),
        Math.round(255 * E(n, i, t - 1 / 3)),
        e,
      ];
    }),
    w(v, function (l, e) {
      var t = e.props,
        o = e.cache,
        r = e.to,
        a = e.from;
      ((m.fn[l] = function (e) {
        if ((r && !this[o] && (this[o] = r(this._rgba)), void 0 === e))
          return this[o].slice();
        var i = D(e),
          n = "array" === i || "object" === i ? e : arguments,
          s = this[o].slice();
        return (
          w(t, function (e, t) {
            e = n["object" === i ? e : t.idx];
            (null == e && (e = s[t.idx]), (s[t.idx] = I(e, t)));
          }),
          a ? (((e = m(a(s)))[o] = s), e) : m(s)
        );
      }),
        w(t, function (r, a) {
          m.fn[r] ||
            (m.fn[r] = function (e) {
              var t,
                i = D(e),
                n = "alpha" === r ? (this._hsla ? "hsla" : "rgba") : l,
                s = this[n](),
                o = s[a.idx];
              return "undefined" === i
                ? o
                : ("function" === i && (i = D((e = e.call(this, o)))),
                  null == e && a.empty
                    ? this
                    : ("string" === i &&
                        (t = f.exec(e)) &&
                        (e = o + parseFloat(t[2]) * ("+" === t[1] ? 1 : -1)),
                      (s[a.idx] = e),
                      this[n](s)));
            });
        }));
    }),
    (m.hook = function (e) {
      e = e.split(" ");
      w(e, function (e, o) {
        ((d.cssHooks[o] = {
          set: function (e, t) {
            var i,
              n,
              s = "";
            if ("transparent" !== t && ("string" !== D(t) || (i = S(t)))) {
              if (((t = m(i || t)), !y.rgba && 1 !== t._rgba[3])) {
                for (
                  n = "backgroundColor" === o ? e.parentNode : e;
                  ("" === s || "transparent" === s) && n && n.style;

                )
                  try {
                    ((s = d.css(n, "backgroundColor")), (n = n.parentNode));
                  } catch (e) {}
                t = t.blend(s && "transparent" !== s ? s : "_default");
              }
              t = t.toRgbaString();
            }
            try {
              e.style[o] = t;
            } catch (e) {}
          },
        }),
          (d.fx.step[o] = function (e) {
            (e.colorInit ||
              ((e.start = m(e.elem, o)),
              (e.end = m(e.end)),
              (e.colorInit = !0)),
              d.cssHooks[o].set(e.elem, e.start.transition(e.end, e.pos)));
          }));
      });
    })(
      "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    ),
    (d.cssHooks.borderColor = {
      expand: function (i) {
        var n = {};
        return (
          w(["Top", "Right", "Bottom", "Left"], function (e, t) {
            n["border" + t + "Color"] = i;
          }),
          n
        );
      },
    }));
  var A,
    M,
    O,
    N,
    L,
    z,
    j,
    F,
    R,
    $,
    q = (d.Color.names = {
      aqua: "#00ffff",
      black: "#000000",
      blue: "#0000ff",
      fuchsia: "#ff00ff",
      gray: "#808080",
      green: "#008000",
      lime: "#00ff00",
      maroon: "#800000",
      navy: "#000080",
      olive: "#808000",
      purple: "#800080",
      red: "#ff0000",
      silver: "#c0c0c0",
      teal: "#008080",
      white: "#ffffff",
      yellow: "#ffff00",
      transparent: [null, null, null, 0],
      _default: "#ffffff",
    }),
    W = "ui-effects-",
    B = "ui-effects-style",
    U = "ui-effects-animated";
  function V(e) {
    var t,
      i,
      n = e.ownerDocument.defaultView
        ? e.ownerDocument.defaultView.getComputedStyle(e, null)
        : e.currentStyle,
      s = {};
    if (n && n.length && n[0] && n[n[0]])
      for (i = n.length; i--; )
        "string" == typeof n[(t = n[i])] &&
          (s[
            t.replace(/-([\da-z])/gi, function (e, t) {
              return t.toUpperCase();
            })
          ] = n[t]);
    else for (t in n) "string" == typeof n[t] && (s[t] = n[t]);
    return s;
  }
  function Q(e, t, i, n) {
    return (
      (e = { effect: (e = Y.isPlainObject(e) ? (t = e).effect : e) }),
      "function" == typeof (t = null == t ? {} : t) &&
        ((n = t), (i = null), (t = {})),
      ("number" != typeof t && !Y.fx.speeds[t]) || ((n = i), (i = t), (t = {})),
      "function" == typeof i && ((n = i), (i = null)),
      t && Y.extend(e, t),
      (i = i || t.duration),
      (e.duration = Y.fx.off
        ? 0
        : "number" == typeof i
          ? i
          : i in Y.fx.speeds
            ? Y.fx.speeds[i]
            : Y.fx.speeds._default),
      (e.complete = n || t.complete),
      e
    );
  }
  function Z(e) {
    return (
      !e ||
      "number" == typeof e ||
      Y.fx.speeds[e] ||
      ("string" == typeof e && !Y.effects.effect[e]) ||
      "function" == typeof e ||
      ("object" == typeof e && !e.effect)
    );
  }
  function X(e, t) {
    var i = t.outerWidth(),
      t = t.outerHeight(),
      e =
        /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(
          e,
        ) || ["", 0, i, t, 0];
    return {
      top: parseFloat(e[1]) || 0,
      right: "auto" === e[2] ? i : parseFloat(e[2]),
      bottom: "auto" === e[3] ? t : parseFloat(e[3]),
      left: parseFloat(e[4]) || 0,
    };
  }
  ((Y.effects = { effect: {} }),
    (N = ["add", "remove", "toggle"]),
    (L = {
      border: 1,
      borderBottom: 1,
      borderColor: 1,
      borderLeft: 1,
      borderRight: 1,
      borderTop: 1,
      borderWidth: 1,
      margin: 1,
      padding: 1,
    }),
    Y.each(
      [
        "borderLeftStyle",
        "borderRightStyle",
        "borderBottomStyle",
        "borderTopStyle",
      ],
      function (e, t) {
        Y.fx.step[t] = function (e) {
          (("none" !== e.end && !e.setAttr) || (1 === e.pos && !e.setAttr)) &&
            (d.style(e.elem, t, e.end), (e.setAttr = !0));
        };
      },
    ),
    Y.fn.addBack ||
      (Y.fn.addBack = function (e) {
        return this.add(
          null == e ? this.prevObject : this.prevObject.filter(e),
        );
      }),
    (Y.effects.animateClass = function (s, e, t, i) {
      var o = Y.speed(e, t, i);
      return this.queue(function () {
        var i = Y(this),
          e = i.attr("class") || "",
          t = (t = o.children ? i.find("*").addBack() : i).map(function () {
            return { el: Y(this), start: V(this) };
          }),
          n = function () {
            Y.each(N, function (e, t) {
              s[t] && i[t + "Class"](s[t]);
            });
          };
        (n(),
          (t = t.map(function () {
            return (
              (this.end = V(this.el[0])),
              (this.diff = (function (e, t) {
                var i,
                  n,
                  s = {};
                for (i in t)
                  ((n = t[i]),
                    e[i] !== n &&
                      (L[i] ||
                        (!Y.fx.step[i] && isNaN(parseFloat(n))) ||
                        (s[i] = n)));
                return s;
              })(this.start, this.end)),
              this
            );
          })),
          i.attr("class", e),
          (t = t.map(function () {
            var e = this,
              t = Y.Deferred(),
              i = Y.extend({}, o, {
                queue: !1,
                complete: function () {
                  t.resolve(e);
                },
              });
            return (this.el.animate(this.diff, i), t.promise());
          })),
          Y.when.apply(Y, t.get()).done(function () {
            (n(),
              Y.each(arguments, function () {
                var t = this.el;
                Y.each(this.diff, function (e) {
                  t.css(e, "");
                });
              }),
              o.complete.call(i[0]));
          }));
      });
    }),
    Y.fn.extend({
      addClass:
        ((O = Y.fn.addClass),
        function (e, t, i, n) {
          return t
            ? Y.effects.animateClass.call(this, { add: e }, t, i, n)
            : O.apply(this, arguments);
        }),
      removeClass:
        ((M = Y.fn.removeClass),
        function (e, t, i, n) {
          return 1 < arguments.length
            ? Y.effects.animateClass.call(this, { remove: e }, t, i, n)
            : M.apply(this, arguments);
        }),
      toggleClass:
        ((A = Y.fn.toggleClass),
        function (e, t, i, n, s) {
          return "boolean" == typeof t || void 0 === t
            ? i
              ? Y.effects.animateClass.call(
                  this,
                  t ? { add: e } : { remove: e },
                  i,
                  n,
                  s,
                )
              : A.apply(this, arguments)
            : Y.effects.animateClass.call(this, { toggle: e }, t, i, n);
        }),
      switchClass: function (e, t, i, n, s) {
        return Y.effects.animateClass.call(
          this,
          { add: t, remove: e },
          i,
          n,
          s,
        );
      },
    }),
    Y.expr &&
      Y.expr.pseudos &&
      Y.expr.pseudos.animated &&
      (Y.expr.pseudos.animated =
        ((z = Y.expr.pseudos.animated),
        function (e) {
          return !!Y(e).data(U) || z(e);
        })),
    !1 !== Y.uiBackCompat &&
      Y.extend(Y.effects, {
        save: function (e, t) {
          for (var i = 0, n = t.length; i < n; i++)
            null !== t[i] && e.data(W + t[i], e[0].style[t[i]]);
        },
        restore: function (e, t) {
          for (var i, n = 0, s = t.length; n < s; n++)
            null !== t[n] && ((i = e.data(W + t[n])), e.css(t[n], i));
        },
        setMode: function (e, t) {
          return (t = "toggle" === t ? (e.is(":hidden") ? "show" : "hide") : t);
        },
        createWrapper: function (i) {
          if (i.parent().is(".ui-effects-wrapper")) return i.parent();
          var n = {
              width: i.outerWidth(!0),
              height: i.outerHeight(!0),
              float: i.css("float"),
            },
            e = Y("<div></div>").addClass("ui-effects-wrapper").css({
              fontSize: "100%",
              background: "transparent",
              border: "none",
              margin: 0,
              padding: 0,
            }),
            t = { width: i.width(), height: i.height() },
            s = document.activeElement;
          try {
            s.id;
          } catch (e) {
            s = document.body;
          }
          return (
            i.wrap(e),
            (i[0] !== s && !Y.contains(i[0], s)) || Y(s).trigger("focus"),
            (e = i.parent()),
            "static" === i.css("position")
              ? (e.css({ position: "relative" }),
                i.css({ position: "relative" }))
              : (Y.extend(n, {
                  position: i.css("position"),
                  zIndex: i.css("z-index"),
                }),
                Y.each(["top", "left", "bottom", "right"], function (e, t) {
                  ((n[t] = i.css(t)),
                    isNaN(parseInt(n[t], 10)) && (n[t] = "auto"));
                }),
                i.css({
                  position: "relative",
                  top: 0,
                  left: 0,
                  right: "auto",
                  bottom: "auto",
                })),
            i.css(t),
            e.css(n).show()
          );
        },
        removeWrapper: function (e) {
          var t = document.activeElement;
          return (
            e.parent().is(".ui-effects-wrapper") &&
              (e.parent().replaceWith(e),
              (e[0] !== t && !Y.contains(e[0], t)) || Y(t).trigger("focus")),
            e
          );
        },
      }),
    Y.extend(Y.effects, {
      version: "1.13.0",
      define: function (e, t, i) {
        return (
          i || ((i = t), (t = "effect")),
          (Y.effects.effect[e] = i),
          (Y.effects.effect[e].mode = t),
          i
        );
      },
      scaledDimensions: function (e, t, i) {
        if (0 === t)
          return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };
        var n = "horizontal" !== i ? (t || 100) / 100 : 1,
          t = "vertical" !== i ? (t || 100) / 100 : 1;
        return {
          height: e.height() * t,
          width: e.width() * n,
          outerHeight: e.outerHeight() * t,
          outerWidth: e.outerWidth() * n,
        };
      },
      clipToBox: function (e) {
        return {
          width: e.clip.right - e.clip.left,
          height: e.clip.bottom - e.clip.top,
          left: e.clip.left,
          top: e.clip.top,
        };
      },
      unshift: function (e, t, i) {
        var n = e.queue();
        (1 < t && n.splice.apply(n, [1, 0].concat(n.splice(t, i))),
          e.dequeue());
      },
      saveStyle: function (e) {
        e.data(B, e[0].style.cssText);
      },
      restoreStyle: function (e) {
        ((e[0].style.cssText = e.data(B) || ""), e.removeData(B));
      },
      mode: function (e, t) {
        e = e.is(":hidden");
        return (
          "toggle" === t && (t = e ? "show" : "hide"),
          (t = (e ? "hide" === t : "show" === t) ? "none" : t)
        );
      },
      getBaseline: function (e, t) {
        var i, n;
        switch (e[0]) {
          case "top":
            i = 0;
            break;
          case "middle":
            i = 0.5;
            break;
          case "bottom":
            i = 1;
            break;
          default:
            i = e[0] / t.height;
        }
        switch (e[1]) {
          case "left":
            n = 0;
            break;
          case "center":
            n = 0.5;
            break;
          case "right":
            n = 1;
            break;
          default:
            n = e[1] / t.width;
        }
        return { x: n, y: i };
      },
      createPlaceholder: function (e) {
        var t,
          i = e.css("position"),
          n = e.position();
        return (
          e
            .css({
              marginTop: e.css("marginTop"),
              marginBottom: e.css("marginBottom"),
              marginLeft: e.css("marginLeft"),
              marginRight: e.css("marginRight"),
            })
            .outerWidth(e.outerWidth())
            .outerHeight(e.outerHeight()),
          /^(static|relative)/.test(i) &&
            ((i = "absolute"),
            (t = Y("<" + e[0].nodeName + ">")
              .insertAfter(e)
              .css({
                display: /^(inline|ruby)/.test(e.css("display"))
                  ? "inline-block"
                  : "block",
                visibility: "hidden",
                marginTop: e.css("marginTop"),
                marginBottom: e.css("marginBottom"),
                marginLeft: e.css("marginLeft"),
                marginRight: e.css("marginRight"),
                float: e.css("float"),
              })
              .outerWidth(e.outerWidth())
              .outerHeight(e.outerHeight())
              .addClass("ui-effects-placeholder")),
            e.data(W + "placeholder", t)),
          e.css({ position: i, left: n.left, top: n.top }),
          t
        );
      },
      removePlaceholder: function (e) {
        var t = W + "placeholder",
          i = e.data(t);
        i && (i.remove(), e.removeData(t));
      },
      cleanUp: function (e) {
        (Y.effects.restoreStyle(e), Y.effects.removePlaceholder(e));
      },
      setTransition: function (n, e, s, o) {
        return (
          (o = o || {}),
          Y.each(e, function (e, t) {
            var i = n.cssUnit(t);
            0 < i[0] && (o[t] = i[0] * s + i[1]);
          }),
          o
        );
      },
    }),
    Y.fn.extend({
      effect: function () {
        function e(e) {
          var t = Y(this),
            i = Y.effects.mode(t, a) || o;
          (t.data(U, !0),
            l.push(i),
            o && ("show" === i || (i === o && "hide" === i)) && t.show(),
            (o && "none" === i) || Y.effects.saveStyle(t),
            "function" == typeof e && e());
        }
        var n = Q.apply(this, arguments),
          s = Y.effects.effect[n.effect],
          o = s.mode,
          t = n.queue,
          i = t || "fx",
          r = n.complete,
          a = n.mode,
          l = [];
        return Y.fx.off || !s
          ? a
            ? this[a](n.duration, r)
            : this.each(function () {
                r && r.call(this);
              })
          : !1 === t
            ? this.each(e).each(h)
            : this.queue(i, e).queue(i, h);
        function h(e) {
          var t = Y(this);
          function i() {
            ("function" == typeof r && r.call(t[0]),
              "function" == typeof e && e());
          }
          ((n.mode = l.shift()),
            !1 === Y.uiBackCompat || o
              ? "none" === n.mode
                ? (t[a](), i())
                : s.call(t[0], n, function () {
                    (t.removeData(U),
                      Y.effects.cleanUp(t),
                      "hide" === n.mode && t.hide(),
                      i());
                  })
              : (t.is(":hidden") ? "hide" === a : "show" === a)
                ? (t[a](), i())
                : s.call(t[0], n, i));
        }
      },
      show:
        ((R = Y.fn.show),
        function (e) {
          if (Z(e)) return R.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "show"), this.effect.call(this, e));
        }),
      hide:
        ((F = Y.fn.hide),
        function (e) {
          if (Z(e)) return F.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "hide"), this.effect.call(this, e));
        }),
      toggle:
        ((j = Y.fn.toggle),
        function (e) {
          if (Z(e) || "boolean" == typeof e) return j.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "toggle"), this.effect.call(this, e));
        }),
      cssUnit: function (e) {
        var i = this.css(e),
          n = [];
        return (
          Y.each(["em", "px", "%", "pt"], function (e, t) {
            0 < i.indexOf(t) && (n = [parseFloat(i), t]);
          }),
          n
        );
      },
      cssClip: function (e) {
        return e
          ? this.css(
              "clip",
              "rect(" +
                e.top +
                "px " +
                e.right +
                "px " +
                e.bottom +
                "px " +
                e.left +
                "px)",
            )
          : X(this.css("clip"), this);
      },
      transfer: function (e, t) {
        var i = Y(this),
          n = Y(e.to),
          s = "fixed" === n.css("position"),
          o = Y("body"),
          r = s ? o.scrollTop() : 0,
          a = s ? o.scrollLeft() : 0,
          o = n.offset(),
          o = {
            top: o.top - r,
            left: o.left - a,
            height: n.innerHeight(),
            width: n.innerWidth(),
          },
          n = i.offset(),
          l = Y("<div class='ui-effects-transfer'></div>");
        l.appendTo("body")
          .addClass(e.className)
          .css({
            top: n.top - r,
            left: n.left - a,
            height: i.innerHeight(),
            width: i.innerWidth(),
            position: s ? "fixed" : "absolute",
          })
          .animate(o, e.duration, e.easing, function () {
            (l.remove(), "function" == typeof t && t());
          });
      },
    }),
    (Y.fx.step.clip = function (e) {
      (e.clipInit ||
        ((e.start = Y(e.elem).cssClip()),
        "string" == typeof e.end && (e.end = X(e.end, e.elem)),
        (e.clipInit = !0)),
        Y(e.elem).cssClip({
          top: e.pos * (e.end.top - e.start.top) + e.start.top,
          right: e.pos * (e.end.right - e.start.right) + e.start.right,
          bottom: e.pos * (e.end.bottom - e.start.bottom) + e.start.bottom,
          left: e.pos * (e.end.left - e.start.left) + e.start.left,
        }));
    }),
    ($ = {}),
    Y.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, e) {
      $[e] = function (e) {
        return Math.pow(e, t + 2);
      };
    }),
    Y.extend($, {
      Sine: function (e) {
        return 1 - Math.cos((e * Math.PI) / 2);
      },
      Circ: function (e) {
        return 1 - Math.sqrt(1 - e * e);
      },
      Elastic: function (e) {
        return 0 === e || 1 === e
          ? e
          : -Math.pow(2, 8 * (e - 1)) *
              Math.sin(((80 * (e - 1) - 7.5) * Math.PI) / 15);
      },
      Back: function (e) {
        return e * e * (3 * e - 2);
      },
      Bounce: function (e) {
        for (var t, i = 4; e < ((t = Math.pow(2, --i)) - 1) / 11; );
        return (
          1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2)
        );
      },
    }),
    Y.each($, function (e, t) {
      ((Y.easing["easeIn" + e] = t),
        (Y.easing["easeOut" + e] = function (e) {
          return 1 - t(1 - e);
        }),
        (Y.easing["easeInOut" + e] = function (e) {
          return e < 0.5 ? t(2 * e) / 2 : 1 - t(-2 * e + 2) / 2;
        }));
    }));
  var _ = Y.effects;
  (Y.effects.define("blind", "hide", function (e, t) {
    var i = {
        up: ["bottom", "top"],
        vertical: ["bottom", "top"],
        down: ["top", "bottom"],
        left: ["right", "left"],
        horizontal: ["right", "left"],
        right: ["left", "right"],
      },
      n = Y(this),
      s = e.direction || "up",
      o = n.cssClip(),
      r = { clip: Y.extend({}, o) },
      a = Y.effects.createPlaceholder(n);
    ((r.clip[i[s][0]] = r.clip[i[s][1]]),
      "show" === e.mode &&
        (n.cssClip(r.clip), a && a.css(Y.effects.clipToBox(r)), (r.clip = o)),
      a && a.animate(Y.effects.clipToBox(r), e.duration, e.easing),
      n.animate(r, {
        queue: !1,
        duration: e.duration,
        easing: e.easing,
        complete: t,
      }));
  }),
    Y.effects.define("bounce", function (e, t) {
      var i,
        n,
        s = Y(this),
        o = e.mode,
        r = "hide" === o,
        a = "show" === o,
        l = e.direction || "up",
        h = e.distance,
        c = e.times || 5,
        o = 2 * c + (a || r ? 1 : 0),
        u = e.duration / o,
        d = e.easing,
        p = "up" === l || "down" === l ? "top" : "left",
        f = "up" === l || "left" === l,
        g = 0,
        e = s.queue().length;
      for (
        Y.effects.createPlaceholder(s),
          l = s.css(p),
          h = h || s["top" == p ? "outerHeight" : "outerWidth"]() / 3,
          a &&
            (((n = { opacity: 1 })[p] = l),
            s
              .css("opacity", 0)
              .css(p, f ? 2 * -h : 2 * h)
              .animate(n, u, d)),
          r && (h /= Math.pow(2, c - 1)),
          (n = {})[p] = l;
        g < c;
        g++
      )
        (((i = {})[p] = (f ? "-=" : "+=") + h),
          s.animate(i, u, d).animate(n, u, d),
          (h = r ? 2 * h : h / 2));
      (r &&
        (((i = { opacity: 0 })[p] = (f ? "-=" : "+=") + h), s.animate(i, u, d)),
        s.queue(t),
        Y.effects.unshift(s, e, 1 + o));
    }),
    Y.effects.define("clip", "hide", function (e, t) {
      var i = {},
        n = Y(this),
        s = e.direction || "vertical",
        o = "both" === s,
        r = o || "horizontal" === s,
        o = o || "vertical" === s,
        s = n.cssClip();
      ((i.clip = {
        top: o ? (s.bottom - s.top) / 2 : s.top,
        right: r ? (s.right - s.left) / 2 : s.right,
        bottom: o ? (s.bottom - s.top) / 2 : s.bottom,
        left: r ? (s.right - s.left) / 2 : s.left,
      }),
        Y.effects.createPlaceholder(n),
        "show" === e.mode && (n.cssClip(i.clip), (i.clip = s)),
        n.animate(i, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    Y.effects.define("drop", "hide", function (e, t) {
      var i = Y(this),
        n = "show" === e.mode,
        s = e.direction || "left",
        o = "up" === s || "down" === s ? "top" : "left",
        r = "up" === s || "left" === s ? "-=" : "+=",
        a = "+=" == r ? "-=" : "+=",
        l = { opacity: 0 };
      (Y.effects.createPlaceholder(i),
        (s =
          e.distance || i["top" == o ? "outerHeight" : "outerWidth"](!0) / 2),
        (l[o] = r + s),
        n && (i.css(l), (l[o] = a + s), (l.opacity = 1)),
        i.animate(l, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    Y.effects.define("explode", "hide", function (e, t) {
      var i,
        n,
        s,
        o,
        r,
        a,
        l = e.pieces ? Math.round(Math.sqrt(e.pieces)) : 3,
        h = l,
        c = Y(this),
        u = "show" === e.mode,
        d = c.show().css("visibility", "hidden").offset(),
        p = Math.ceil(c.outerWidth() / h),
        f = Math.ceil(c.outerHeight() / l),
        g = [];
      function m() {
        (g.push(this),
          g.length === l * h &&
            (c.css({ visibility: "visible" }), Y(g).remove(), t()));
      }
      for (i = 0; i < l; i++)
        for (o = d.top + i * f, a = i - (l - 1) / 2, n = 0; n < h; n++)
          ((s = d.left + n * p),
            (r = n - (h - 1) / 2),
            c
              .clone()
              .appendTo("body")
              .wrap("<div></div>")
              .css({
                position: "absolute",
                visibility: "visible",
                left: -n * p,
                top: -i * f,
              })
              .parent()
              .addClass("ui-effects-explode")
              .css({
                position: "absolute",
                overflow: "hidden",
                width: p,
                height: f,
                left: s + (u ? r * p : 0),
                top: o + (u ? a * f : 0),
                opacity: u ? 0 : 1,
              })
              .animate(
                {
                  left: s + (u ? 0 : r * p),
                  top: o + (u ? 0 : a * f),
                  opacity: u ? 1 : 0,
                },
                e.duration || 500,
                e.easing,
                m,
              ));
    }),
    Y.effects.define("fade", "toggle", function (e, t) {
      var i = "show" === e.mode;
      Y(this)
        .css("opacity", i ? 0 : 1)
        .animate(
          { opacity: i ? 1 : 0 },
          { queue: !1, duration: e.duration, easing: e.easing, complete: t },
        );
    }),
    Y.effects.define("fold", "hide", function (t, e) {
      var i = Y(this),
        n = t.mode,
        s = "show" === n,
        o = "hide" === n,
        r = t.size || 15,
        a = /([0-9]+)%/.exec(r),
        l = !!t.horizFirst ? ["right", "bottom"] : ["bottom", "right"],
        h = t.duration / 2,
        c = Y.effects.createPlaceholder(i),
        u = i.cssClip(),
        d = { clip: Y.extend({}, u) },
        p = { clip: Y.extend({}, u) },
        f = [u[l[0]], u[l[1]]],
        n = i.queue().length;
      (a && (r = (parseInt(a[1], 10) / 100) * f[o ? 0 : 1]),
        (d.clip[l[0]] = r),
        (p.clip[l[0]] = r),
        (p.clip[l[1]] = 0),
        s &&
          (i.cssClip(p.clip), c && c.css(Y.effects.clipToBox(p)), (p.clip = u)),
        i
          .queue(function (e) {
            (c &&
              c
                .animate(Y.effects.clipToBox(d), h, t.easing)
                .animate(Y.effects.clipToBox(p), h, t.easing),
              e());
          })
          .animate(d, h, t.easing)
          .animate(p, h, t.easing)
          .queue(e),
        Y.effects.unshift(i, n, 4));
    }),
    Y.effects.define("highlight", "show", function (e, t) {
      var i = Y(this),
        n = { backgroundColor: i.css("backgroundColor") };
      ("hide" === e.mode && (n.opacity = 0),
        Y.effects.saveStyle(i),
        i
          .css({
            backgroundImage: "none",
            backgroundColor: e.color || "#ffff99",
          })
          .animate(n, {
            queue: !1,
            duration: e.duration,
            easing: e.easing,
            complete: t,
          }));
    }),
    Y.effects.define("size", function (n, t) {
      var s,
        i = Y(this),
        e = ["fontSize"],
        o = [
          "borderTopWidth",
          "borderBottomWidth",
          "paddingTop",
          "paddingBottom",
        ],
        r = [
          "borderLeftWidth",
          "borderRightWidth",
          "paddingLeft",
          "paddingRight",
        ],
        a = n.mode,
        l = "effect" !== a,
        h = n.scale || "both",
        c = n.origin || ["middle", "center"],
        u = i.css("position"),
        d = i.position(),
        p = Y.effects.scaledDimensions(i),
        f = n.from || p,
        g = n.to || Y.effects.scaledDimensions(i, 0);
      (Y.effects.createPlaceholder(i),
        "show" === a && ((a = f), (f = g), (g = a)),
        (s = {
          from: { y: f.height / p.height, x: f.width / p.width },
          to: { y: g.height / p.height, x: g.width / p.width },
        }),
        ("box" !== h && "both" !== h) ||
          (s.from.y !== s.to.y &&
            ((f = Y.effects.setTransition(i, o, s.from.y, f)),
            (g = Y.effects.setTransition(i, o, s.to.y, g))),
          s.from.x !== s.to.x &&
            ((f = Y.effects.setTransition(i, r, s.from.x, f)),
            (g = Y.effects.setTransition(i, r, s.to.x, g)))),
        ("content" !== h && "both" !== h) ||
          (s.from.y !== s.to.y &&
            ((f = Y.effects.setTransition(i, e, s.from.y, f)),
            (g = Y.effects.setTransition(i, e, s.to.y, g)))),
        c &&
          ((c = Y.effects.getBaseline(c, p)),
          (f.top = (p.outerHeight - f.outerHeight) * c.y + d.top),
          (f.left = (p.outerWidth - f.outerWidth) * c.x + d.left),
          (g.top = (p.outerHeight - g.outerHeight) * c.y + d.top),
          (g.left = (p.outerWidth - g.outerWidth) * c.x + d.left)),
        delete f.outerHeight,
        delete f.outerWidth,
        i.css(f),
        ("content" !== h && "both" !== h) ||
          ((o = o.concat(["marginTop", "marginBottom"]).concat(e)),
          (r = r.concat(["marginLeft", "marginRight"])),
          i.find("*[width]").each(function () {
            var e = Y(this),
              t = Y.effects.scaledDimensions(e),
              i = {
                height: t.height * s.from.y,
                width: t.width * s.from.x,
                outerHeight: t.outerHeight * s.from.y,
                outerWidth: t.outerWidth * s.from.x,
              },
              t = {
                height: t.height * s.to.y,
                width: t.width * s.to.x,
                outerHeight: t.height * s.to.y,
                outerWidth: t.width * s.to.x,
              };
            (s.from.y !== s.to.y &&
              ((i = Y.effects.setTransition(e, o, s.from.y, i)),
              (t = Y.effects.setTransition(e, o, s.to.y, t))),
              s.from.x !== s.to.x &&
                ((i = Y.effects.setTransition(e, r, s.from.x, i)),
                (t = Y.effects.setTransition(e, r, s.to.x, t))),
              l && Y.effects.saveStyle(e),
              e.css(i),
              e.animate(t, n.duration, n.easing, function () {
                l && Y.effects.restoreStyle(e);
              }));
          })),
        i.animate(g, {
          queue: !1,
          duration: n.duration,
          easing: n.easing,
          complete: function () {
            var e = i.offset();
            (0 === g.opacity && i.css("opacity", f.opacity),
              l ||
                (i.css("position", "static" === u ? "relative" : u).offset(e),
                Y.effects.saveStyle(i)),
              t());
          },
        }));
    }),
    Y.effects.define("scale", function (e, t) {
      var i = Y(this),
        n = e.mode,
        n =
          parseInt(e.percent, 10) ||
          (0 === parseInt(e.percent, 10) || "effect" !== n ? 0 : 100),
        n = Y.extend(
          !0,
          {
            from: Y.effects.scaledDimensions(i),
            to: Y.effects.scaledDimensions(i, n, e.direction || "both"),
            origin: e.origin || ["middle", "center"],
          },
          e,
        );
      (e.fade && ((n.from.opacity = 1), (n.to.opacity = 0)),
        Y.effects.effect.size.call(this, n, t));
    }),
    Y.effects.define("puff", "hide", function (e, t) {
      e = Y.extend(!0, {}, e, {
        fade: !0,
        percent: parseInt(e.percent, 10) || 150,
      });
      Y.effects.effect.scale.call(this, e, t);
    }),
    Y.effects.define("pulsate", "show", function (e, t) {
      var i = Y(this),
        n = e.mode,
        s = "show" === n,
        o = 2 * (e.times || 5) + (s || "hide" === n ? 1 : 0),
        r = e.duration / o,
        a = 0,
        l = 1,
        n = i.queue().length;
      for (
        (!s && i.is(":visible")) || (i.css("opacity", 0).show(), (a = 1));
        l < o;
        l++
      )
        (i.animate({ opacity: a }, r, e.easing), (a = 1 - a));
      (i.animate({ opacity: a }, r, e.easing),
        i.queue(t),
        Y.effects.unshift(i, n, 1 + o));
    }),
    Y.effects.define("shake", function (e, t) {
      var i = 1,
        n = Y(this),
        s = e.direction || "left",
        o = e.distance || 20,
        r = e.times || 3,
        a = 2 * r + 1,
        l = Math.round(e.duration / a),
        h = "up" === s || "down" === s ? "top" : "left",
        c = "up" === s || "left" === s,
        u = {},
        d = {},
        p = {},
        s = n.queue().length;
      for (
        Y.effects.createPlaceholder(n),
          u[h] = (c ? "-=" : "+=") + o,
          d[h] = (c ? "+=" : "-=") + 2 * o,
          p[h] = (c ? "-=" : "+=") + 2 * o,
          n.animate(u, l, e.easing);
        i < r;
        i++
      )
        n.animate(d, l, e.easing).animate(p, l, e.easing);
      (n
        .animate(d, l, e.easing)
        .animate(u, l / 2, e.easing)
        .queue(t),
        Y.effects.unshift(n, s, 1 + a));
    }),
    Y.effects.define("slide", "show", function (e, t) {
      var i,
        n,
        s = Y(this),
        o = {
          up: ["bottom", "top"],
          down: ["top", "bottom"],
          left: ["right", "left"],
          right: ["left", "right"],
        },
        r = e.mode,
        a = e.direction || "left",
        l = "up" === a || "down" === a ? "top" : "left",
        h = "up" === a || "left" === a,
        c = e.distance || s["top" == l ? "outerHeight" : "outerWidth"](!0),
        u = {};
      (Y.effects.createPlaceholder(s),
        (i = s.cssClip()),
        (n = s.position()[l]),
        (u[l] = (h ? -1 : 1) * c + n),
        (u.clip = s.cssClip()),
        (u.clip[o[a][1]] = u.clip[o[a][0]]),
        "show" === r &&
          (s.cssClip(u.clip), s.css(l, u[l]), (u.clip = i), (u[l] = n)),
        s.animate(u, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    (_ =
      !1 !== Y.uiBackCompat
        ? Y.effects.define("transfer", function (e, t) {
            Y(this).transfer(e, t);
          })
        : _));
  ((Y.ui.focusable = function (e, t) {
    var i,
      n,
      s,
      o,
      r = e.nodeName.toLowerCase();
    return "area" === r
      ? ((n = (i = e.parentNode).name),
        !(!e.href || !n || "map" !== i.nodeName.toLowerCase()) &&
          0 < (n = Y("img[usemap='#" + n + "']")).length &&
          n.is(":visible"))
      : (/^(input|select|textarea|button|object)$/.test(r)
          ? (s = !e.disabled) &&
            (o = Y(e).closest("fieldset")[0]) &&
            (s = !o.disabled)
          : (s = ("a" === r && e.href) || t),
        s &&
          Y(e).is(":visible") &&
          (function (e) {
            var t = e.css("visibility");
            for (; "inherit" === t; )
              ((e = e.parent()), (t = e.css("visibility")));
            return "visible" === t;
          })(Y(e)));
  }),
    Y.extend(Y.expr.pseudos, {
      focusable: function (e) {
        return Y.ui.focusable(e, null != Y.attr(e, "tabindex"));
      },
    }));
  var K, G;
  (Y.ui.focusable,
    (Y.fn._form = function () {
      return "string" == typeof this[0].form
        ? this.closest("form")
        : Y(this[0].form);
    }),
    (Y.ui.formResetMixin = {
      _formResetHandler: function () {
        var t = Y(this);
        setTimeout(function () {
          var e = t.data("ui-form-reset-instances");
          Y.each(e, function () {
            this.refresh();
          });
        });
      },
      _bindFormResetHandler: function () {
        var e;
        ((this.form = this.element._form()),
          this.form.length &&
            ((e = this.form.data("ui-form-reset-instances") || []).length ||
              this.form.on("reset.ui-form-reset", this._formResetHandler),
            e.push(this),
            this.form.data("ui-form-reset-instances", e)));
      },
      _unbindFormResetHandler: function () {
        var e;
        this.form.length &&
          ((e = this.form.data("ui-form-reset-instances")).splice(
            Y.inArray(this, e),
            1,
          ),
          e.length
            ? this.form.data("ui-form-reset-instances", e)
            : this.form
                .removeData("ui-form-reset-instances")
                .off("reset.ui-form-reset"));
      },
    }));
  (Y.expr.pseudos || (Y.expr.pseudos = Y.expr[":"]),
    Y.uniqueSort || (Y.uniqueSort = Y.unique),
    Y.escapeSelector ||
      ((K = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g),
      (G = function (e, t) {
        return t
          ? "\0" === e
            ? "�"
            : e.slice(0, -1) +
              "\\" +
              e.charCodeAt(e.length - 1).toString(16) +
              " "
          : "\\" + e;
      }),
      (Y.escapeSelector = function (e) {
        return (e + "").replace(K, G);
      })),
    (Y.fn.even && Y.fn.odd) ||
      Y.fn.extend({
        even: function () {
          return this.filter(function (e) {
            return e % 2 == 0;
          });
        },
        odd: function () {
          return this.filter(function (e) {
            return e % 2 == 1;
          });
        },
      }));
  var J;
  ((Y.ui.keyCode = {
    BACKSPACE: 8,
    COMMA: 188,
    DELETE: 46,
    DOWN: 40,
    END: 35,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    PERIOD: 190,
    RIGHT: 39,
    SPACE: 32,
    TAB: 9,
    UP: 38,
  }),
    (Y.fn.labels = function () {
      var e, t, i;
      return this.length
        ? this[0].labels && this[0].labels.length
          ? this.pushStack(this[0].labels)
          : ((t = this.eq(0).parents("label")),
            (e = this.attr("id")) &&
              ((i = (i = this.eq(0).parents().last()).add(
                (i.length ? i : this).siblings(),
              )),
              (e = "label[for='" + Y.escapeSelector(e) + "']"),
              (t = t.add(i.find(e).addBack(e)))),
            this.pushStack(t))
        : this.pushStack([]);
    }),
    (Y.fn.scrollParent = function (e) {
      var t = this.css("position"),
        i = "absolute" === t,
        n = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
        e = this.parents()
          .filter(function () {
            var e = Y(this);
            return (
              (!i || "static" !== e.css("position")) &&
              n.test(
                e.css("overflow") + e.css("overflow-y") + e.css("overflow-x"),
              )
            );
          })
          .eq(0);
      return "fixed" !== t && e.length
        ? e
        : Y(this[0].ownerDocument || document);
    }),
    Y.extend(Y.expr.pseudos, {
      tabbable: function (e) {
        var t = Y.attr(e, "tabindex"),
          i = null != t;
        return (!i || 0 <= t) && Y.ui.focusable(e, i);
      },
    }),
    Y.fn.extend({
      uniqueId:
        ((J = 0),
        function () {
          return this.each(function () {
            this.id || (this.id = "ui-id-" + ++J);
          });
        }),
      removeUniqueId: function () {
        return this.each(function () {
          /^ui-id-\d+$/.test(this.id) && Y(this).removeAttr("id");
        });
      },
    }),
    Y.widget("ui.accordion", {
      version: "1.13.0",
      options: {
        active: 0,
        animate: {},
        classes: {
          "ui-accordion-header": "ui-corner-top",
          "ui-accordion-header-collapsed": "ui-corner-all",
          "ui-accordion-content": "ui-corner-bottom",
        },
        collapsible: !1,
        event: "click",
        header: function (e) {
          return e.find("> li > :first-child").add(e.find("> :not(li)").even());
        },
        heightStyle: "auto",
        icons: {
          activeHeader: "ui-icon-triangle-1-s",
          header: "ui-icon-triangle-1-e",
        },
        activate: null,
        beforeActivate: null,
      },
      hideProps: {
        borderTopWidth: "hide",
        borderBottomWidth: "hide",
        paddingTop: "hide",
        paddingBottom: "hide",
        height: "hide",
      },
      showProps: {
        borderTopWidth: "show",
        borderBottomWidth: "show",
        paddingTop: "show",
        paddingBottom: "show",
        height: "show",
      },
      _create: function () {
        var e = this.options;
        ((this.prevShow = this.prevHide = Y()),
          this._addClass("ui-accordion", "ui-widget ui-helper-reset"),
          this.element.attr("role", "tablist"),
          e.collapsible ||
            (!1 !== e.active && null != e.active) ||
            (e.active = 0),
          this._processPanels(),
          e.active < 0 && (e.active += this.headers.length),
          this._refresh());
      },
      _getCreateEventData: function () {
        return {
          header: this.active,
          panel: this.active.length ? this.active.next() : Y(),
        };
      },
      _createIcons: function () {
        var e,
          t = this.options.icons;
        t &&
          ((e = Y("<span>")),
          this._addClass(e, "ui-accordion-header-icon", "ui-icon " + t.header),
          e.prependTo(this.headers),
          (e = this.active.children(".ui-accordion-header-icon")),
          this._removeClass(e, t.header)
            ._addClass(e, null, t.activeHeader)
            ._addClass(this.headers, "ui-accordion-icons"));
      },
      _destroyIcons: function () {
        (this._removeClass(this.headers, "ui-accordion-icons"),
          this.headers.children(".ui-accordion-header-icon").remove());
      },
      _destroy: function () {
        var e;
        (this.element.removeAttr("role"),
          this.headers
            .removeAttr(
              "role aria-expanded aria-selected aria-controls tabIndex",
            )
            .removeUniqueId(),
          this._destroyIcons(),
          (e = this.headers
            .next()
            .css("display", "")
            .removeAttr("role aria-hidden aria-labelledby")
            .removeUniqueId()),
          "content" !== this.options.heightStyle && e.css("height", ""));
      },
      _setOption: function (e, t) {
        "active" !== e
          ? ("event" === e &&
              (this.options.event &&
                this._off(this.headers, this.options.event),
              this._setupEvents(t)),
            this._super(e, t),
            "collapsible" !== e ||
              t ||
              !1 !== this.options.active ||
              this._activate(0),
            "icons" === e && (this._destroyIcons(), t && this._createIcons()))
          : this._activate(t);
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", e),
          this._toggleClass(null, "ui-state-disabled", !!e),
          this._toggleClass(
            this.headers.add(this.headers.next()),
            null,
            "ui-state-disabled",
            !!e,
          ));
      },
      _keydown: function (e) {
        if (!e.altKey && !e.ctrlKey) {
          var t = Y.ui.keyCode,
            i = this.headers.length,
            n = this.headers.index(e.target),
            s = !1;
          switch (e.keyCode) {
            case t.RIGHT:
            case t.DOWN:
              s = this.headers[(n + 1) % i];
              break;
            case t.LEFT:
            case t.UP:
              s = this.headers[(n - 1 + i) % i];
              break;
            case t.SPACE:
            case t.ENTER:
              this._eventHandler(e);
              break;
            case t.HOME:
              s = this.headers[0];
              break;
            case t.END:
              s = this.headers[i - 1];
          }
          s &&
            (Y(e.target).attr("tabIndex", -1),
            Y(s).attr("tabIndex", 0),
            Y(s).trigger("focus"),
            e.preventDefault());
        }
      },
      _panelKeyDown: function (e) {
        e.keyCode === Y.ui.keyCode.UP &&
          e.ctrlKey &&
          Y(e.currentTarget).prev().trigger("focus");
      },
      refresh: function () {
        var e = this.options;
        (this._processPanels(),
          (!1 === e.active && !0 === e.collapsible) || !this.headers.length
            ? ((e.active = !1), (this.active = Y()))
            : !1 === e.active
              ? this._activate(0)
              : this.active.length &&
                  !Y.contains(this.element[0], this.active[0])
                ? this.headers.length ===
                  this.headers.find(".ui-state-disabled").length
                  ? ((e.active = !1), (this.active = Y()))
                  : this._activate(Math.max(0, e.active - 1))
                : (e.active = this.headers.index(this.active)),
          this._destroyIcons(),
          this._refresh());
      },
      _processPanels: function () {
        var e = this.headers,
          t = this.panels;
        ("function" == typeof this.options.header
          ? (this.headers = this.options.header(this.element))
          : (this.headers = this.element.find(this.options.header)),
          this._addClass(
            this.headers,
            "ui-accordion-header ui-accordion-header-collapsed",
            "ui-state-default",
          ),
          (this.panels = this.headers
            .next()
            .filter(":not(.ui-accordion-content-active)")
            .hide()),
          this._addClass(
            this.panels,
            "ui-accordion-content",
            "ui-helper-reset ui-widget-content",
          ),
          t && (this._off(e.not(this.headers)), this._off(t.not(this.panels))));
      },
      _refresh: function () {
        var i,
          e = this.options,
          t = e.heightStyle,
          n = this.element.parent();
        ((this.active = this._findActive(e.active)),
          this._addClass(
            this.active,
            "ui-accordion-header-active",
            "ui-state-active",
          )._removeClass(this.active, "ui-accordion-header-collapsed"),
          this._addClass(this.active.next(), "ui-accordion-content-active"),
          this.active.next().show(),
          this.headers
            .attr("role", "tab")
            .each(function () {
              var e = Y(this),
                t = e.uniqueId().attr("id"),
                i = e.next(),
                n = i.uniqueId().attr("id");
              (e.attr("aria-controls", n), i.attr("aria-labelledby", t));
            })
            .next()
            .attr("role", "tabpanel"),
          this.headers
            .not(this.active)
            .attr({
              "aria-selected": "false",
              "aria-expanded": "false",
              tabIndex: -1,
            })
            .next()
            .attr({ "aria-hidden": "true" })
            .hide(),
          this.active.length
            ? this.active
                .attr({
                  "aria-selected": "true",
                  "aria-expanded": "true",
                  tabIndex: 0,
                })
                .next()
                .attr({ "aria-hidden": "false" })
            : this.headers.eq(0).attr("tabIndex", 0),
          this._createIcons(),
          this._setupEvents(e.event),
          "fill" === t
            ? ((i = n.height()),
              this.element.siblings(":visible").each(function () {
                var e = Y(this),
                  t = e.css("position");
                "absolute" !== t && "fixed" !== t && (i -= e.outerHeight(!0));
              }),
              this.headers.each(function () {
                i -= Y(this).outerHeight(!0);
              }),
              this.headers
                .next()
                .each(function () {
                  Y(this).height(
                    Math.max(0, i - Y(this).innerHeight() + Y(this).height()),
                  );
                })
                .css("overflow", "auto"))
            : "auto" === t &&
              ((i = 0),
              this.headers
                .next()
                .each(function () {
                  var e = Y(this).is(":visible");
                  (e || Y(this).show(),
                    (i = Math.max(i, Y(this).css("height", "").height())),
                    e || Y(this).hide());
                })
                .height(i)));
      },
      _activate: function (e) {
        e = this._findActive(e)[0];
        e !== this.active[0] &&
          ((e = e || this.active[0]),
          this._eventHandler({
            target: e,
            currentTarget: e,
            preventDefault: Y.noop,
          }));
      },
      _findActive: function (e) {
        return "number" == typeof e ? this.headers.eq(e) : Y();
      },
      _setupEvents: function (e) {
        var i = { keydown: "_keydown" };
        (e &&
          Y.each(e.split(" "), function (e, t) {
            i[t] = "_eventHandler";
          }),
          this._off(this.headers.add(this.headers.next())),
          this._on(this.headers, i),
          this._on(this.headers.next(), { keydown: "_panelKeyDown" }),
          this._hoverable(this.headers),
          this._focusable(this.headers));
      },
      _eventHandler: function (e) {
        var t = this.options,
          i = this.active,
          n = Y(e.currentTarget),
          s = n[0] === i[0],
          o = s && t.collapsible,
          r = o ? Y() : n.next(),
          a = i.next(),
          r = {
            oldHeader: i,
            oldPanel: a,
            newHeader: o ? Y() : n,
            newPanel: r,
          };
        (e.preventDefault(),
          (s && !t.collapsible) ||
            !1 === this._trigger("beforeActivate", e, r) ||
            ((t.active = !o && this.headers.index(n)),
            (this.active = s ? Y() : n),
            this._toggle(r),
            this._removeClass(
              i,
              "ui-accordion-header-active",
              "ui-state-active",
            ),
            t.icons &&
              ((i = i.children(".ui-accordion-header-icon")),
              this._removeClass(i, null, t.icons.activeHeader)._addClass(
                i,
                null,
                t.icons.header,
              )),
            s ||
              (this._removeClass(n, "ui-accordion-header-collapsed")._addClass(
                n,
                "ui-accordion-header-active",
                "ui-state-active",
              ),
              t.icons &&
                ((s = n.children(".ui-accordion-header-icon")),
                this._removeClass(s, null, t.icons.header)._addClass(
                  s,
                  null,
                  t.icons.activeHeader,
                )),
              this._addClass(n.next(), "ui-accordion-content-active"))));
      },
      _toggle: function (e) {
        var t = e.newPanel,
          i = this.prevShow.length ? this.prevShow : e.oldPanel;
        (this.prevShow.add(this.prevHide).stop(!0, !0),
          (this.prevShow = t),
          (this.prevHide = i),
          this.options.animate
            ? this._animate(t, i, e)
            : (i.hide(), t.show(), this._toggleComplete(e)),
          i.attr({ "aria-hidden": "true" }),
          i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }),
          t.length && i.length
            ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" })
            : t.length &&
              this.headers
                .filter(function () {
                  return 0 === parseInt(Y(this).attr("tabIndex"), 10);
                })
                .attr("tabIndex", -1),
          t.attr("aria-hidden", "false").prev().attr({
            "aria-selected": "true",
            "aria-expanded": "true",
            tabIndex: 0,
          }));
      },
      _animate: function (e, i, t) {
        function n() {
          a._toggleComplete(t);
        }
        var s,
          o,
          r,
          a = this,
          l = 0,
          h = e.css("box-sizing"),
          c = e.length && (!i.length || e.index() < i.index()),
          u = this.options.animate || {},
          c = (c && u.down) || u;
        return (
          (o = (o = "string" == typeof c ? c : o) || c.easing || u.easing),
          (r = (r = "number" == typeof c ? c : r) || c.duration || u.duration),
          i.length
            ? e.length
              ? ((s = e.show().outerHeight()),
                i.animate(this.hideProps, {
                  duration: r,
                  easing: o,
                  step: function (e, t) {
                    t.now = Math.round(e);
                  },
                }),
                void e.hide().animate(this.showProps, {
                  duration: r,
                  easing: o,
                  complete: n,
                  step: function (e, t) {
                    ((t.now = Math.round(e)),
                      "height" !== t.prop
                        ? "content-box" === h && (l += t.now)
                        : "content" !== a.options.heightStyle &&
                          ((t.now = Math.round(s - i.outerHeight() - l)),
                          (l = 0)));
                  },
                }))
              : i.animate(this.hideProps, r, o, n)
            : e.animate(this.showProps, r, o, n)
        );
      },
      _toggleComplete: function (e) {
        var t = e.oldPanel,
          i = t.prev();
        (this._removeClass(t, "ui-accordion-content-active"),
          this._removeClass(i, "ui-accordion-header-active")._addClass(
            i,
            "ui-accordion-header-collapsed",
          ),
          t.length && (t.parent()[0].className = t.parent()[0].className),
          this._trigger("activate", null, e));
      },
    }),
    (Y.ui.safeActiveElement = function (t) {
      var i;
      try {
        i = t.activeElement;
      } catch (e) {
        i = t.body;
      }
      return (i = !(i = i || t.body).nodeName ? t.body : i);
    }),
    Y.widget("ui.menu", {
      version: "1.13.0",
      defaultElement: "<ul>",
      delay: 300,
      options: {
        icons: { submenu: "ui-icon-caret-1-e" },
        items: "> *",
        menus: "ul",
        position: { my: "left top", at: "right top" },
        role: "menu",
        blur: null,
        focus: null,
        select: null,
      },
      _create: function () {
        ((this.activeMenu = this.element),
          (this.mouseHandled = !1),
          (this.lastMousePosition = { x: null, y: null }),
          this.element
            .uniqueId()
            .attr({ role: this.options.role, tabIndex: 0 }),
          this._addClass("ui-menu", "ui-widget ui-widget-content"),
          this._on({
            "mousedown .ui-menu-item": function (e) {
              (e.preventDefault(), this._activateItem(e));
            },
            "click .ui-menu-item": function (e) {
              var t = Y(e.target),
                i = Y(Y.ui.safeActiveElement(this.document[0]));
              !this.mouseHandled &&
                t.not(".ui-state-disabled").length &&
                (this.select(e),
                e.isPropagationStopped() || (this.mouseHandled = !0),
                t.has(".ui-menu").length
                  ? this.expand(e)
                  : !this.element.is(":focus") &&
                    i.closest(".ui-menu").length &&
                    (this.element.trigger("focus", [!0]),
                    this.active &&
                      1 === this.active.parents(".ui-menu").length &&
                      clearTimeout(this.timer)));
            },
            "mouseenter .ui-menu-item": "_activateItem",
            "mousemove .ui-menu-item": "_activateItem",
            mouseleave: "collapseAll",
            "mouseleave .ui-menu": "collapseAll",
            focus: function (e, t) {
              var i = this.active || this._menuItems().first();
              t || this.focus(e, i);
            },
            blur: function (e) {
              this._delay(function () {
                Y.contains(
                  this.element[0],
                  Y.ui.safeActiveElement(this.document[0]),
                ) || this.collapseAll(e);
              });
            },
            keydown: "_keydown",
          }),
          this.refresh(),
          this._on(this.document, {
            click: function (e) {
              (this._closeOnDocumentClick(e) && this.collapseAll(e, !0),
                (this.mouseHandled = !1));
            },
          }));
      },
      _activateItem: function (e) {
        var t, i;
        this.previousFilter ||
          (e.clientX === this.lastMousePosition.x &&
            e.clientY === this.lastMousePosition.y) ||
          ((this.lastMousePosition = { x: e.clientX, y: e.clientY }),
          (t = Y(e.target).closest(".ui-menu-item")),
          (i = Y(e.currentTarget)),
          t[0] === i[0] &&
            (i.is(".ui-state-active") ||
              (this._removeClass(
                i.siblings().children(".ui-state-active"),
                null,
                "ui-state-active",
              ),
              this.focus(e, i))));
      },
      _destroy: function () {
        var e = this.element
          .find(".ui-menu-item")
          .removeAttr("role aria-disabled")
          .children(".ui-menu-item-wrapper")
          .removeUniqueId()
          .removeAttr("tabIndex role aria-haspopup");
        (this.element
          .removeAttr("aria-activedescendant")
          .find(".ui-menu")
          .addBack()
          .removeAttr(
            "role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex",
          )
          .removeUniqueId()
          .show(),
          e.children().each(function () {
            var e = Y(this);
            e.data("ui-menu-submenu-caret") && e.remove();
          }));
      },
      _keydown: function (e) {
        var t,
          i,
          n,
          s = !0;
        switch (e.keyCode) {
          case Y.ui.keyCode.PAGE_UP:
            this.previousPage(e);
            break;
          case Y.ui.keyCode.PAGE_DOWN:
            this.nextPage(e);
            break;
          case Y.ui.keyCode.HOME:
            this._move("first", "first", e);
            break;
          case Y.ui.keyCode.END:
            this._move("last", "last", e);
            break;
          case Y.ui.keyCode.UP:
            this.previous(e);
            break;
          case Y.ui.keyCode.DOWN:
            this.next(e);
            break;
          case Y.ui.keyCode.LEFT:
            this.collapse(e);
            break;
          case Y.ui.keyCode.RIGHT:
            this.active &&
              !this.active.is(".ui-state-disabled") &&
              this.expand(e);
            break;
          case Y.ui.keyCode.ENTER:
          case Y.ui.keyCode.SPACE:
            this._activate(e);
            break;
          case Y.ui.keyCode.ESCAPE:
            this.collapse(e);
            break;
          default:
            ((t = this.previousFilter || ""),
              (n = s = !1),
              (i =
                96 <= e.keyCode && e.keyCode <= 105
                  ? (e.keyCode - 96).toString()
                  : String.fromCharCode(e.keyCode)),
              clearTimeout(this.filterTimer),
              i === t ? (n = !0) : (i = t + i),
              (t = this._filterMenuItems(i)),
              (t =
                n && -1 !== t.index(this.active.next())
                  ? this.active.nextAll(".ui-menu-item")
                  : t).length ||
                ((i = String.fromCharCode(e.keyCode)),
                (t = this._filterMenuItems(i))),
              t.length
                ? (this.focus(e, t),
                  (this.previousFilter = i),
                  (this.filterTimer = this._delay(function () {
                    delete this.previousFilter;
                  }, 1e3)))
                : delete this.previousFilter);
        }
        s && e.preventDefault();
      },
      _activate: function (e) {
        this.active &&
          !this.active.is(".ui-state-disabled") &&
          (this.active.children("[aria-haspopup='true']").length
            ? this.expand(e)
            : this.select(e));
      },
      refresh: function () {
        var e,
          t,
          n = this,
          s = this.options.icons.submenu,
          i = this.element.find(this.options.menus);
        (this._toggleClass(
          "ui-menu-icons",
          null,
          !!this.element.find(".ui-icon").length,
        ),
          (t = i
            .filter(":not(.ui-menu)")
            .hide()
            .attr({
              role: this.options.role,
              "aria-hidden": "true",
              "aria-expanded": "false",
            })
            .each(function () {
              var e = Y(this),
                t = e.prev(),
                i = Y("<span>").data("ui-menu-submenu-caret", !0);
              (n._addClass(i, "ui-menu-icon", "ui-icon " + s),
                t.attr("aria-haspopup", "true").prepend(i),
                e.attr("aria-labelledby", t.attr("id")));
            })),
          this._addClass(t, "ui-menu", "ui-widget ui-widget-content ui-front"),
          (e = i.add(this.element).find(this.options.items))
            .not(".ui-menu-item")
            .each(function () {
              var e = Y(this);
              n._isDivider(e) &&
                n._addClass(e, "ui-menu-divider", "ui-widget-content");
            }),
          (i = (t = e.not(".ui-menu-item, .ui-menu-divider"))
            .children()
            .not(".ui-menu")
            .uniqueId()
            .attr({ tabIndex: -1, role: this._itemRole() })),
          this._addClass(t, "ui-menu-item")._addClass(
            i,
            "ui-menu-item-wrapper",
          ),
          e.filter(".ui-state-disabled").attr("aria-disabled", "true"),
          this.active &&
            !Y.contains(this.element[0], this.active[0]) &&
            this.blur());
      },
      _itemRole: function () {
        return { menu: "menuitem", listbox: "option" }[this.options.role];
      },
      _setOption: function (e, t) {
        var i;
        ("icons" === e &&
          ((i = this.element.find(".ui-menu-icon")),
          this._removeClass(i, null, this.options.icons.submenu)._addClass(
            i,
            null,
            t.submenu,
          )),
          this._super(e, t));
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", String(e)),
          this._toggleClass(null, "ui-state-disabled", !!e));
      },
      focus: function (e, t) {
        var i;
        (this.blur(e, e && "focus" === e.type),
          this._scrollIntoView(t),
          (this.active = t.first()),
          (i = this.active.children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          this.options.role &&
            this.element.attr("aria-activedescendant", i.attr("id")),
          (i = this.active
            .parent()
            .closest(".ui-menu-item")
            .children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          e && "keydown" === e.type
            ? this._close()
            : (this.timer = this._delay(function () {
                this._close();
              }, this.delay)),
          (i = t.children(".ui-menu")).length &&
            e &&
            /^mouse/.test(e.type) &&
            this._startOpening(i),
          (this.activeMenu = t.parent()),
          this._trigger("focus", e, { item: t }));
      },
      _scrollIntoView: function (e) {
        var t, i, n;
        this._hasScroll() &&
          ((i = parseFloat(Y.css(this.activeMenu[0], "borderTopWidth")) || 0),
          (n = parseFloat(Y.css(this.activeMenu[0], "paddingTop")) || 0),
          (t = e.offset().top - this.activeMenu.offset().top - i - n),
          (i = this.activeMenu.scrollTop()),
          (n = this.activeMenu.height()),
          (e = e.outerHeight()),
          t < 0
            ? this.activeMenu.scrollTop(i + t)
            : n < t + e && this.activeMenu.scrollTop(i + t - n + e));
      },
      blur: function (e, t) {
        (t || clearTimeout(this.timer),
          this.active &&
            (this._removeClass(
              this.active.children(".ui-menu-item-wrapper"),
              null,
              "ui-state-active",
            ),
            this._trigger("blur", e, { item: this.active }),
            (this.active = null)));
      },
      _startOpening: function (e) {
        (clearTimeout(this.timer),
          "true" === e.attr("aria-hidden") &&
            (this.timer = this._delay(function () {
              (this._close(), this._open(e));
            }, this.delay)));
      },
      _open: function (e) {
        var t = Y.extend({ of: this.active }, this.options.position);
        (clearTimeout(this.timer),
          this.element
            .find(".ui-menu")
            .not(e.parents(".ui-menu"))
            .hide()
            .attr("aria-hidden", "true"),
          e
            .show()
            .removeAttr("aria-hidden")
            .attr("aria-expanded", "true")
            .position(t));
      },
      collapseAll: function (t, i) {
        (clearTimeout(this.timer),
          (this.timer = this._delay(
            function () {
              var e = i
                ? this.element
                : Y(t && t.target).closest(this.element.find(".ui-menu"));
              (e.length || (e = this.element),
                this._close(e),
                this.blur(t),
                this._removeClass(
                  e.find(".ui-state-active"),
                  null,
                  "ui-state-active",
                ),
                (this.activeMenu = e));
            },
            i ? 0 : this.delay,
          )));
      },
      _close: function (e) {
        (e = e || (this.active ? this.active.parent() : this.element))
          .find(".ui-menu")
          .hide()
          .attr("aria-hidden", "true")
          .attr("aria-expanded", "false");
      },
      _closeOnDocumentClick: function (e) {
        return !Y(e.target).closest(".ui-menu").length;
      },
      _isDivider: function (e) {
        return !/[^\-\u2014\u2013\s]/.test(e.text());
      },
      collapse: function (e) {
        var t =
          this.active &&
          this.active.parent().closest(".ui-menu-item", this.element);
        t && t.length && (this._close(), this.focus(e, t));
      },
      expand: function (e) {
        var t =
          this.active &&
          this._menuItems(this.active.children(".ui-menu")).first();
        t &&
          t.length &&
          (this._open(t.parent()),
          this._delay(function () {
            this.focus(e, t);
          }));
      },
      next: function (e) {
        this._move("next", "first", e);
      },
      previous: function (e) {
        this._move("prev", "last", e);
      },
      isFirstItem: function () {
        return this.active && !this.active.prevAll(".ui-menu-item").length;
      },
      isLastItem: function () {
        return this.active && !this.active.nextAll(".ui-menu-item").length;
      },
      _menuItems: function (e) {
        return (e || this.element)
          .find(this.options.items)
          .filter(".ui-menu-item");
      },
      _move: function (e, t, i) {
        var n;
        (((n = this.active
          ? "first" === e || "last" === e
            ? this.active["first" === e ? "prevAll" : "nextAll"](
                ".ui-menu-item",
              ).last()
            : this.active[e + "All"](".ui-menu-item").first()
          : n) &&
          n.length &&
          this.active) ||
          (n = this._menuItems(this.activeMenu)[t]()),
          this.focus(i, n));
      },
      nextPage: function (e) {
        var t, i, n;
        this.active
          ? this.isLastItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.nextAll(".ui-menu-item").each(function () {
                  return (t = Y(this)).offset().top - i - n < 0;
                }),
                this.focus(e, t))
              : this.focus(
                  e,
                  this._menuItems(this.activeMenu)[
                    this.active ? "last" : "first"
                  ](),
                ))
          : this.next(e);
      },
      previousPage: function (e) {
        var t, i, n;
        this.active
          ? this.isFirstItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.prevAll(".ui-menu-item").each(function () {
                  return 0 < (t = Y(this)).offset().top - i + n;
                }),
                this.focus(e, t))
              : this.focus(e, this._menuItems(this.activeMenu).first()))
          : this.next(e);
      },
      _hasScroll: function () {
        return this.element.outerHeight() < this.element.prop("scrollHeight");
      },
      select: function (e) {
        this.active = this.active || Y(e.target).closest(".ui-menu-item");
        var t = { item: this.active };
        (this.active.has(".ui-menu").length || this.collapseAll(e, !0),
          this._trigger("select", e, t));
      },
      _filterMenuItems: function (e) {
        var e = e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"),
          t = new RegExp("^" + e, "i");
        return this.activeMenu
          .find(this.options.items)
          .filter(".ui-menu-item")
          .filter(function () {
            return t.test(
              String.prototype.trim.call(
                Y(this).children(".ui-menu-item-wrapper").text(),
              ),
            );
          });
      },
    }));
  (Y.widget("ui.autocomplete", {
    version: "1.13.0",
    defaultElement: "<input>",
    options: {
      appendTo: null,
      autoFocus: !1,
      delay: 300,
      minLength: 1,
      position: { my: "left top", at: "left bottom", collision: "none" },
      source: null,
      change: null,
      close: null,
      focus: null,
      open: null,
      response: null,
      search: null,
      select: null,
    },
    requestIndex: 0,
    pending: 0,
    _create: function () {
      var i,
        n,
        s,
        e = this.element[0].nodeName.toLowerCase(),
        t = "textarea" === e,
        e = "input" === e;
      ((this.isMultiLine = t || (!e && this._isContentEditable(this.element))),
        (this.valueMethod = this.element[t || e ? "val" : "text"]),
        (this.isNewMenu = !0),
        this._addClass("ui-autocomplete-input"),
        this.element.attr("autocomplete", "off"),
        this._on(this.element, {
          keydown: function (e) {
            if (this.element.prop("readOnly")) n = s = i = !0;
            else {
              n = s = i = !1;
              var t = Y.ui.keyCode;
              switch (e.keyCode) {
                case t.PAGE_UP:
                  ((i = !0), this._move("previousPage", e));
                  break;
                case t.PAGE_DOWN:
                  ((i = !0), this._move("nextPage", e));
                  break;
                case t.UP:
                  ((i = !0), this._keyEvent("previous", e));
                  break;
                case t.DOWN:
                  ((i = !0), this._keyEvent("next", e));
                  break;
                case t.ENTER:
                  this.menu.active &&
                    ((i = !0), e.preventDefault(), this.menu.select(e));
                  break;
                case t.TAB:
                  this.menu.active && this.menu.select(e);
                  break;
                case t.ESCAPE:
                  this.menu.element.is(":visible") &&
                    (this.isMultiLine || this._value(this.term),
                    this.close(e),
                    e.preventDefault());
                  break;
                default:
                  ((n = !0), this._searchTimeout(e));
              }
            }
          },
          keypress: function (e) {
            if (i)
              return (
                (i = !1),
                void (
                  (this.isMultiLine && !this.menu.element.is(":visible")) ||
                  e.preventDefault()
                )
              );
            if (!n) {
              var t = Y.ui.keyCode;
              switch (e.keyCode) {
                case t.PAGE_UP:
                  this._move("previousPage", e);
                  break;
                case t.PAGE_DOWN:
                  this._move("nextPage", e);
                  break;
                case t.UP:
                  this._keyEvent("previous", e);
                  break;
                case t.DOWN:
                  this._keyEvent("next", e);
              }
            }
          },
          input: function (e) {
            if (s) return ((s = !1), void e.preventDefault());
            this._searchTimeout(e);
          },
          focus: function () {
            ((this.selectedItem = null), (this.previous = this._value()));
          },
          blur: function (e) {
            (clearTimeout(this.searching), this.close(e), this._change(e));
          },
        }),
        this._initSource(),
        (this.menu = Y("<ul>")
          .appendTo(this._appendTo())
          .menu({ role: null })
          .hide()
          .attr({ unselectable: "on" })
          .menu("instance")),
        this._addClass(this.menu.element, "ui-autocomplete", "ui-front"),
        this._on(this.menu.element, {
          mousedown: function (e) {
            e.preventDefault();
          },
          menufocus: function (e, t) {
            var i;
            if (
              this.isNewMenu &&
              ((this.isNewMenu = !1),
              e.originalEvent && /^mouse/.test(e.originalEvent.type))
            )
              return (
                this.menu.blur(),
                void this.document.one("mousemove", function () {
                  Y(e.target).trigger(e.originalEvent);
                })
              );
            ((i = t.item.data("ui-autocomplete-item")),
              !1 !== this._trigger("focus", e, { item: i }) &&
                e.originalEvent &&
                /^key/.test(e.originalEvent.type) &&
                this._value(i.value),
              (i = t.item.attr("aria-label") || i.value) &&
                String.prototype.trim.call(i).length &&
                (this.liveRegion.children().hide(),
                Y("<div>").text(i).appendTo(this.liveRegion)));
          },
          menuselect: function (e, t) {
            var i = t.item.data("ui-autocomplete-item"),
              n = this.previous;
            (this.element[0] !== Y.ui.safeActiveElement(this.document[0]) &&
              (this.element.trigger("focus"),
              (this.previous = n),
              this._delay(function () {
                ((this.previous = n), (this.selectedItem = i));
              })),
              !1 !== this._trigger("select", e, { item: i }) &&
                this._value(i.value),
              (this.term = this._value()),
              this.close(e),
              (this.selectedItem = i));
          },
        }),
        (this.liveRegion = Y("<div>", {
          role: "status",
          "aria-live": "assertive",
          "aria-relevant": "additions",
        }).appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        }));
    },
    _destroy: function () {
      (clearTimeout(this.searching),
        this.element.removeAttr("autocomplete"),
        this.menu.element.remove(),
        this.liveRegion.remove());
    },
    _setOption: function (e, t) {
      (this._super(e, t),
        "source" === e && this._initSource(),
        "appendTo" === e && this.menu.element.appendTo(this._appendTo()),
        "disabled" === e && t && this.xhr && this.xhr.abort());
    },
    _isEventTargetInWidget: function (e) {
      var t = this.menu.element[0];
      return (
        e.target === this.element[0] ||
        e.target === t ||
        Y.contains(t, e.target)
      );
    },
    _closeOnClickOutside: function (e) {
      this._isEventTargetInWidget(e) || this.close();
    },
    _appendTo: function () {
      var e = this.options.appendTo;
      return (e = !(e =
        !(e =
          e && (e.jquery || e.nodeType ? Y(e) : this.document.find(e).eq(0))) ||
        !e[0]
          ? this.element.closest(".ui-front, dialog")
          : e).length
        ? this.document[0].body
        : e);
    },
    _initSource: function () {
      var i,
        n,
        s = this;
      Array.isArray(this.options.source)
        ? ((i = this.options.source),
          (this.source = function (e, t) {
            t(Y.ui.autocomplete.filter(i, e.term));
          }))
        : "string" == typeof this.options.source
          ? ((n = this.options.source),
            (this.source = function (e, t) {
              (s.xhr && s.xhr.abort(),
                (s.xhr = Y.ajax({
                  url: n,
                  data: e,
                  dataType: "json",
                  success: function (e) {
                    t(e);
                  },
                  error: function () {
                    t([]);
                  },
                })));
            }))
          : (this.source = this.options.source);
    },
    _searchTimeout: function (n) {
      (clearTimeout(this.searching),
        (this.searching = this._delay(function () {
          var e = this.term === this._value(),
            t = this.menu.element.is(":visible"),
            i = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
          (e && (t || i)) || ((this.selectedItem = null), this.search(null, n));
        }, this.options.delay)));
    },
    search: function (e, t) {
      return (
        (e = null != e ? e : this._value()),
        (this.term = this._value()),
        e.length < this.options.minLength
          ? this.close(t)
          : !1 !== this._trigger("search", t)
            ? this._search(e)
            : void 0
      );
    },
    _search: function (e) {
      (this.pending++,
        this._addClass("ui-autocomplete-loading"),
        (this.cancelSearch = !1),
        this.source({ term: e }, this._response()));
    },
    _response: function () {
      var t = ++this.requestIndex;
      return function (e) {
        (t === this.requestIndex && this.__response(e),
          this.pending--,
          this.pending || this._removeClass("ui-autocomplete-loading"));
      }.bind(this);
    },
    __response: function (e) {
      ((e = e && this._normalize(e)),
        this._trigger("response", null, { content: e }),
        !this.options.disabled && e && e.length && !this.cancelSearch
          ? (this._suggest(e), this._trigger("open"))
          : this._close());
    },
    close: function (e) {
      ((this.cancelSearch = !0), this._close(e));
    },
    _close: function (e) {
      (this._off(this.document, "mousedown"),
        this.menu.element.is(":visible") &&
          (this.menu.element.hide(),
          this.menu.blur(),
          (this.isNewMenu = !0),
          this._trigger("close", e)));
    },
    _change: function (e) {
      this.previous !== this._value() &&
        this._trigger("change", e, { item: this.selectedItem });
    },
    _normalize: function (e) {
      return e.length && e[0].label && e[0].value
        ? e
        : Y.map(e, function (e) {
            return "string" == typeof e
              ? { label: e, value: e }
              : Y.extend({}, e, {
                  label: e.label || e.value,
                  value: e.value || e.label,
                });
          });
    },
    _suggest: function (e) {
      var t = this.menu.element.empty();
      (this._renderMenu(t, e),
        (this.isNewMenu = !0),
        this.menu.refresh(),
        t.show(),
        this._resizeMenu(),
        t.position(Y.extend({ of: this.element }, this.options.position)),
        this.options.autoFocus && this.menu.next(),
        this._on(this.document, { mousedown: "_closeOnClickOutside" }));
    },
    _resizeMenu: function () {
      var e = this.menu.element;
      e.outerWidth(
        Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()),
      );
    },
    _renderMenu: function (i, e) {
      var n = this;
      Y.each(e, function (e, t) {
        n._renderItemData(i, t);
      });
    },
    _renderItemData: function (e, t) {
      return this._renderItem(e, t).data("ui-autocomplete-item", t);
    },
    _renderItem: function (e, t) {
      return Y("<li>").append(Y("<div>").text(t.label)).appendTo(e);
    },
    _move: function (e, t) {
      if (this.menu.element.is(":visible"))
        return (this.menu.isFirstItem() && /^previous/.test(e)) ||
          (this.menu.isLastItem() && /^next/.test(e))
          ? (this.isMultiLine || this._value(this.term), void this.menu.blur())
          : void this.menu[e](t);
      this.search(null, t);
    },
    widget: function () {
      return this.menu.element;
    },
    _value: function () {
      return this.valueMethod.apply(this.element, arguments);
    },
    _keyEvent: function (e, t) {
      (this.isMultiLine && !this.menu.element.is(":visible")) ||
        (this._move(e, t), t.preventDefault());
    },
    _isContentEditable: function (e) {
      if (!e.length) return !1;
      var t = e.prop("contentEditable");
      return "inherit" === t
        ? this._isContentEditable(e.parent())
        : "true" === t;
    },
  }),
    Y.extend(Y.ui.autocomplete, {
      escapeRegex: function (e) {
        return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
      },
      filter: function (e, t) {
        var i = new RegExp(Y.ui.autocomplete.escapeRegex(t), "i");
        return Y.grep(e, function (e) {
          return i.test(e.label || e.value || e);
        });
      },
    }),
    Y.widget("ui.autocomplete", Y.ui.autocomplete, {
      options: {
        messages: {
          noResults: "No search results.",
          results: function (e) {
            return (
              e +
              (1 < e ? " results are" : " result is") +
              " available, use up and down arrow keys to navigate."
            );
          },
        },
      },
      __response: function (e) {
        (this._superApply(arguments),
          this.options.disabled ||
            this.cancelSearch ||
            ((e =
              e && e.length
                ? this.options.messages.results(e.length)
                : this.options.messages.noResults),
            this.liveRegion.children().hide(),
            Y("<div>").text(e).appendTo(this.liveRegion)));
      },
    }));
  Y.ui.autocomplete;
  var ee = /ui-corner-([a-z]){2,6}/g;
  Y.widget("ui.controlgroup", {
    version: "1.13.0",
    defaultElement: "<div>",
    options: {
      direction: "horizontal",
      disabled: null,
      onlyVisible: !0,
      items: {
        button:
          "input[type=button], input[type=submit], input[type=reset], button, a",
        controlgroupLabel: ".ui-controlgroup-label",
        checkboxradio: "input[type='checkbox'], input[type='radio']",
        selectmenu: "select",
        spinner: ".ui-spinner-input",
      },
    },
    _create: function () {
      this._enhance();
    },
    _enhance: function () {
      (this.element.attr("role", "toolbar"), this.refresh());
    },
    _destroy: function () {
      (this._callChildMethod("destroy"),
        this.childWidgets.removeData("ui-controlgroup-data"),
        this.element.removeAttr("role"),
        this.options.items.controlgroupLabel &&
          this.element
            .find(this.options.items.controlgroupLabel)
            .find(".ui-controlgroup-label-contents")
            .contents()
            .unwrap());
    },
    _initWidgets: function () {
      var o = this,
        r = [];
      (Y.each(this.options.items, function (n, e) {
        var t,
          s = {};
        if (e)
          return "controlgroupLabel" === n
            ? ((t = o.element.find(e)).each(function () {
                var e = Y(this);
                e.children(".ui-controlgroup-label-contents").length ||
                  e
                    .contents()
                    .wrapAll(
                      "<span class='ui-controlgroup-label-contents'></span>",
                    );
              }),
              o._addClass(
                t,
                null,
                "ui-widget ui-widget-content ui-state-default",
              ),
              void (r = r.concat(t.get())))
            : void (
                Y.fn[n] &&
                ((s = o["_" + n + "Options"]
                  ? o["_" + n + "Options"]("middle")
                  : { classes: {} }),
                o.element.find(e).each(function () {
                  var e = Y(this),
                    t = e[n]("instance"),
                    i = Y.widget.extend({}, s);
                  ("button" === n && e.parent(".ui-spinner").length) ||
                    ((t = t || e[n]()[n]("instance")) &&
                      (i.classes = o._resolveClassesValues(i.classes, t)),
                    e[n](i),
                    (i = e[n]("widget")),
                    Y.data(i[0], "ui-controlgroup-data", t || e[n]("instance")),
                    r.push(i[0]));
                }))
              );
      }),
        (this.childWidgets = Y(Y.uniqueSort(r))),
        this._addClass(this.childWidgets, "ui-controlgroup-item"));
    },
    _callChildMethod: function (t) {
      this.childWidgets.each(function () {
        var e = Y(this).data("ui-controlgroup-data");
        e && e[t] && e[t]();
      });
    },
    _updateCornerClass: function (e, t) {
      t = this._buildSimpleOptions(t, "label").classes.label;
      (this._removeClass(
        e,
        null,
        "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",
      ),
        this._addClass(e, null, t));
    },
    _buildSimpleOptions: function (e, t) {
      var i = "vertical" === this.options.direction,
        n = { classes: {} };
      return (
        (n.classes[t] = {
          middle: "",
          first: "ui-corner-" + (i ? "top" : "left"),
          last: "ui-corner-" + (i ? "bottom" : "right"),
          only: "ui-corner-all",
        }[e]),
        n
      );
    },
    _spinnerOptions: function (e) {
      e = this._buildSimpleOptions(e, "ui-spinner");
      return (
        (e.classes["ui-spinner-up"] = ""),
        (e.classes["ui-spinner-down"] = ""),
        e
      );
    },
    _buttonOptions: function (e) {
      return this._buildSimpleOptions(e, "ui-button");
    },
    _checkboxradioOptions: function (e) {
      return this._buildSimpleOptions(e, "ui-checkboxradio-label");
    },
    _selectmenuOptions: function (e) {
      var t = "vertical" === this.options.direction;
      return {
        width: t && "auto",
        classes: {
          middle: {
            "ui-selectmenu-button-open": "",
            "ui-selectmenu-button-closed": "",
          },
          first: {
            "ui-selectmenu-button-open": "ui-corner-" + (t ? "top" : "tl"),
            "ui-selectmenu-button-closed": "ui-corner-" + (t ? "top" : "left"),
          },
          last: {
            "ui-selectmenu-button-open": t ? "" : "ui-corner-tr",
            "ui-selectmenu-button-closed":
              "ui-corner-" + (t ? "bottom" : "right"),
          },
          only: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
        }[e],
      };
    },
    _resolveClassesValues: function (i, n) {
      var s = {};
      return (
        Y.each(i, function (e) {
          var t = n.options.classes[e] || "",
            t = String.prototype.trim.call(t.replace(ee, ""));
          s[e] = (t + " " + i[e]).replace(/\s+/g, " ");
        }),
        s
      );
    },
    _setOption: function (e, t) {
      ("direction" === e &&
        this._removeClass("ui-controlgroup-" + this.options.direction),
        this._super(e, t),
        "disabled" !== e
          ? this.refresh()
          : this._callChildMethod(t ? "disable" : "enable"));
    },
    refresh: function () {
      var s,
        o = this;
      (this._addClass(
        "ui-controlgroup ui-controlgroup-" + this.options.direction,
      ),
        "horizontal" === this.options.direction &&
          this._addClass(null, "ui-helper-clearfix"),
        this._initWidgets(),
        (s = this.childWidgets),
        (s = this.options.onlyVisible ? s.filter(":visible") : s).length &&
          (Y.each(["first", "last"], function (e, t) {
            var i,
              n = s[t]().data("ui-controlgroup-data");
            n && o["_" + n.widgetName + "Options"]
              ? (((i = o["_" + n.widgetName + "Options"](
                  1 === s.length ? "only" : t,
                )).classes = o._resolveClassesValues(i.classes, n)),
                n.element[n.widgetName](i))
              : o._updateCornerClass(s[t](), t);
          }),
          this._callChildMethod("refresh")));
    },
  });
  Y.widget("ui.checkboxradio", [
    Y.ui.formResetMixin,
    {
      version: "1.13.0",
      options: {
        disabled: null,
        label: null,
        icon: !0,
        classes: {
          "ui-checkboxradio-label": "ui-corner-all",
          "ui-checkboxradio-icon": "ui-corner-all",
        },
      },
      _getCreateOptions: function () {
        var e,
          t = this,
          i = this._super() || {};
        return (
          this._readType(),
          (e = this.element.labels()),
          (this.label = Y(e[e.length - 1])),
          this.label.length ||
            Y.error("No label found for checkboxradio widget"),
          (this.originalLabel = ""),
          this.label
            .contents()
            .not(this.element[0])
            .each(function () {
              t.originalLabel +=
                3 === this.nodeType ? Y(this).text() : this.outerHTML;
            }),
          this.originalLabel && (i.label = this.originalLabel),
          null != (e = this.element[0].disabled) && (i.disabled = e),
          i
        );
      },
      _create: function () {
        var e = this.element[0].checked;
        (this._bindFormResetHandler(),
          null == this.options.disabled &&
            (this.options.disabled = this.element[0].disabled),
          this._setOption("disabled", this.options.disabled),
          this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"),
          this._addClass(
            this.label,
            "ui-checkboxradio-label",
            "ui-button ui-widget",
          ),
          "radio" === this.type &&
            this._addClass(this.label, "ui-checkboxradio-radio-label"),
          this.options.label && this.options.label !== this.originalLabel
            ? this._updateLabel()
            : this.originalLabel && (this.options.label = this.originalLabel),
          this._enhance(),
          e &&
            this._addClass(
              this.label,
              "ui-checkboxradio-checked",
              "ui-state-active",
            ),
          this._on({
            change: "_toggleClasses",
            focus: function () {
              this._addClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus",
              );
            },
            blur: function () {
              this._removeClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus",
              );
            },
          }));
      },
      _readType: function () {
        var e = this.element[0].nodeName.toLowerCase();
        ((this.type = this.element[0].type),
          ("input" === e && /radio|checkbox/.test(this.type)) ||
            Y.error(
              "Can't create checkboxradio on element.nodeName=" +
                e +
                " and element.type=" +
                this.type,
            ));
      },
      _enhance: function () {
        this._updateIcon(this.element[0].checked);
      },
      widget: function () {
        return this.label;
      },
      _getRadioGroup: function () {
        var e = this.element[0].name,
          t = "input[name='" + Y.escapeSelector(e) + "']";
        return e
          ? (this.form.length
              ? Y(this.form[0].elements).filter(t)
              : Y(t).filter(function () {
                  return 0 === Y(this)._form().length;
                })
            ).not(this.element)
          : Y([]);
      },
      _toggleClasses: function () {
        var e = this.element[0].checked;
        (this._toggleClass(
          this.label,
          "ui-checkboxradio-checked",
          "ui-state-active",
          e,
        ),
          this.options.icon &&
            "checkbox" === this.type &&
            this._toggleClass(
              this.icon,
              null,
              "ui-icon-check ui-state-checked",
              e,
            )._toggleClass(this.icon, null, "ui-icon-blank", !e),
          "radio" === this.type &&
            this._getRadioGroup().each(function () {
              var e = Y(this).checkboxradio("instance");
              e &&
                e._removeClass(
                  e.label,
                  "ui-checkboxradio-checked",
                  "ui-state-active",
                );
            }));
      },
      _destroy: function () {
        (this._unbindFormResetHandler(),
          this.icon && (this.icon.remove(), this.iconSpace.remove()));
      },
      _setOption: function (e, t) {
        if ("label" !== e || t) {
          if ((this._super(e, t), "disabled" === e))
            return (
              this._toggleClass(this.label, null, "ui-state-disabled", t),
              void (this.element[0].disabled = t)
            );
          this.refresh();
        }
      },
      _updateIcon: function (e) {
        var t = "ui-icon ui-icon-background ";
        this.options.icon
          ? (this.icon ||
              ((this.icon = Y("<span>")),
              (this.iconSpace = Y("<span> </span>")),
              this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")),
            "checkbox" === this.type
              ? ((t += e ? "ui-icon-check ui-state-checked" : "ui-icon-blank"),
                this._removeClass(
                  this.icon,
                  null,
                  e ? "ui-icon-blank" : "ui-icon-check",
                ))
              : (t += "ui-icon-blank"),
            this._addClass(this.icon, "ui-checkboxradio-icon", t),
            e ||
              this._removeClass(
                this.icon,
                null,
                "ui-icon-check ui-state-checked",
              ),
            this.icon.prependTo(this.label).after(this.iconSpace))
          : void 0 !== this.icon &&
            (this.icon.remove(), this.iconSpace.remove(), delete this.icon);
      },
      _updateLabel: function () {
        var e = this.label.contents().not(this.element[0]);
        (this.icon && (e = e.not(this.icon[0])),
          (e = this.iconSpace ? e.not(this.iconSpace[0]) : e).remove(),
          this.label.append(this.options.label));
      },
      refresh: function () {
        var e = this.element[0].checked,
          t = this.element[0].disabled;
        (this._updateIcon(e),
          this._toggleClass(
            this.label,
            "ui-checkboxradio-checked",
            "ui-state-active",
            e,
          ),
          null !== this.options.label && this._updateLabel(),
          t !== this.options.disabled && this._setOptions({ disabled: t }));
      },
    },
  ]);
  var te;
  Y.ui.checkboxradio;
  (Y.widget("ui.button", {
    version: "1.13.0",
    defaultElement: "<button>",
    options: {
      classes: { "ui-button": "ui-corner-all" },
      disabled: null,
      icon: null,
      iconPosition: "beginning",
      label: null,
      showLabel: !0,
    },
    _getCreateOptions: function () {
      var e,
        t = this._super() || {};
      return (
        (this.isInput = this.element.is("input")),
        null != (e = this.element[0].disabled) && (t.disabled = e),
        (this.originalLabel = this.isInput
          ? this.element.val()
          : this.element.html()),
        this.originalLabel && (t.label = this.originalLabel),
        t
      );
    },
    _create: function () {
      (!this.option.showLabel & !this.options.icon &&
        (this.options.showLabel = !0),
        null == this.options.disabled &&
          (this.options.disabled = this.element[0].disabled || !1),
        (this.hasTitle = !!this.element.attr("title")),
        this.options.label &&
          this.options.label !== this.originalLabel &&
          (this.isInput
            ? this.element.val(this.options.label)
            : this.element.html(this.options.label)),
        this._addClass("ui-button", "ui-widget"),
        this._setOption("disabled", this.options.disabled),
        this._enhance(),
        this.element.is("a") &&
          this._on({
            keyup: function (e) {
              e.keyCode === Y.ui.keyCode.SPACE &&
                (e.preventDefault(),
                this.element[0].click
                  ? this.element[0].click()
                  : this.element.trigger("click"));
            },
          }));
    },
    _enhance: function () {
      (this.element.is("button") || this.element.attr("role", "button"),
        this.options.icon &&
          (this._updateIcon("icon", this.options.icon), this._updateTooltip()));
    },
    _updateTooltip: function () {
      ((this.title = this.element.attr("title")),
        this.options.showLabel ||
          this.title ||
          this.element.attr("title", this.options.label));
    },
    _updateIcon: function (e, t) {
      var i = "iconPosition" !== e,
        n = i ? this.options.iconPosition : t,
        e = "top" === n || "bottom" === n;
      (this.icon
        ? i && this._removeClass(this.icon, null, this.options.icon)
        : ((this.icon = Y("<span>")),
          this._addClass(this.icon, "ui-button-icon", "ui-icon"),
          this.options.showLabel || this._addClass("ui-button-icon-only")),
        i && this._addClass(this.icon, null, t),
        this._attachIcon(n),
        e
          ? (this._addClass(this.icon, null, "ui-widget-icon-block"),
            this.iconSpace && this.iconSpace.remove())
          : (this.iconSpace ||
              ((this.iconSpace = Y("<span> </span>")),
              this._addClass(this.iconSpace, "ui-button-icon-space")),
            this._removeClass(this.icon, null, "ui-wiget-icon-block"),
            this._attachIconSpace(n)));
    },
    _destroy: function () {
      (this.element.removeAttr("role"),
        this.icon && this.icon.remove(),
        this.iconSpace && this.iconSpace.remove(),
        this.hasTitle || this.element.removeAttr("title"));
    },
    _attachIconSpace: function (e) {
      this.icon[/^(?:end|bottom)/.test(e) ? "before" : "after"](this.iconSpace);
    },
    _attachIcon: function (e) {
      this.element[/^(?:end|bottom)/.test(e) ? "append" : "prepend"](this.icon);
    },
    _setOptions: function (e) {
      var t = (void 0 === e.showLabel ? this.options : e).showLabel,
        i = (void 0 === e.icon ? this.options : e).icon;
      (t || i || (e.showLabel = !0), this._super(e));
    },
    _setOption: function (e, t) {
      ("icon" === e &&
        (t
          ? this._updateIcon(e, t)
          : this.icon &&
            (this.icon.remove(), this.iconSpace && this.iconSpace.remove())),
        "iconPosition" === e && this._updateIcon(e, t),
        "showLabel" === e &&
          (this._toggleClass("ui-button-icon-only", null, !t),
          this._updateTooltip()),
        "label" === e &&
          (this.isInput
            ? this.element.val(t)
            : (this.element.html(t),
              this.icon &&
                (this._attachIcon(this.options.iconPosition),
                this._attachIconSpace(this.options.iconPosition)))),
        this._super(e, t),
        "disabled" === e &&
          (this._toggleClass(null, "ui-state-disabled", t),
          (this.element[0].disabled = t) && this.element.trigger("blur")));
    },
    refresh: function () {
      var e = this.element.is("input, button")
        ? this.element[0].disabled
        : this.element.hasClass("ui-button-disabled");
      (e !== this.options.disabled && this._setOptions({ disabled: e }),
        this._updateTooltip());
    },
  }),
    !1 !== Y.uiBackCompat &&
      (Y.widget("ui.button", Y.ui.button, {
        options: { text: !0, icons: { primary: null, secondary: null } },
        _create: function () {
          (this.options.showLabel &&
            !this.options.text &&
            (this.options.showLabel = this.options.text),
            !this.options.showLabel &&
              this.options.text &&
              (this.options.text = this.options.showLabel),
            this.options.icon ||
            (!this.options.icons.primary && !this.options.icons.secondary)
              ? this.options.icon &&
                (this.options.icons.primary = this.options.icon)
              : this.options.icons.primary
                ? (this.options.icon = this.options.icons.primary)
                : ((this.options.icon = this.options.icons.secondary),
                  (this.options.iconPosition = "end")),
            this._super());
        },
        _setOption: function (e, t) {
          "text" !== e
            ? ("showLabel" === e && (this.options.text = t),
              "icon" === e && (this.options.icons.primary = t),
              "icons" === e &&
                (t.primary
                  ? (this._super("icon", t.primary),
                    this._super("iconPosition", "beginning"))
                  : t.secondary &&
                    (this._super("icon", t.secondary),
                    this._super("iconPosition", "end"))),
              this._superApply(arguments))
            : this._super("showLabel", t);
        },
      }),
      (Y.fn.button =
        ((te = Y.fn.button),
        function (i) {
          var e = "string" == typeof i,
            n = Array.prototype.slice.call(arguments, 1),
            s = this;
          return (
            e
              ? this.length || "instance" !== i
                ? this.each(function () {
                    var e = Y(this).attr("type"),
                      t = Y.data(
                        this,
                        "ui-" +
                          ("checkbox" !== e && "radio" !== e
                            ? "button"
                            : "checkboxradio"),
                      );
                    return "instance" === i
                      ? ((s = t), !1)
                      : t
                        ? "function" != typeof t[i] || "_" === i.charAt(0)
                          ? Y.error(
                              "no such method '" +
                                i +
                                "' for button widget instance",
                            )
                          : (e = t[i].apply(t, n)) !== t && void 0 !== e
                            ? ((s = e && e.jquery ? s.pushStack(e.get()) : e),
                              !1)
                            : void 0
                        : Y.error(
                            "cannot call methods on button prior to initialization; attempted to call method '" +
                              i +
                              "'",
                          );
                  })
                : (s = void 0)
              : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
                this.each(function () {
                  var e = Y(this).attr("type"),
                    t =
                      "checkbox" !== e && "radio" !== e
                        ? "button"
                        : "checkboxradio",
                    e = Y.data(this, "ui-" + t);
                  e
                    ? (e.option(i || {}), e._init && e._init())
                    : "button" != t
                      ? Y(this).checkboxradio(Y.extend({ icon: !1 }, i))
                      : te.call(Y(this), i);
                })),
            s
          );
        })),
      (Y.fn.buttonset = function () {
        return (
          Y.ui.controlgroup || Y.error("Controlgroup widget missing"),
          "option" === arguments[0] && "items" === arguments[1] && arguments[2]
            ? this.controlgroup.apply(this, [
                arguments[0],
                "items.button",
                arguments[2],
              ])
            : "option" === arguments[0] && "items" === arguments[1]
              ? this.controlgroup.apply(this, [arguments[0], "items.button"])
              : ("object" == typeof arguments[0] &&
                  arguments[0].items &&
                  (arguments[0].items = { button: arguments[0].items }),
                this.controlgroup.apply(this, arguments))
        );
      })));
  var ie;
  Y.ui.button;
  function ne() {
    ((this._curInst = null),
      (this._keyEvent = !1),
      (this._disabledInputs = []),
      (this._datepickerShowing = !1),
      (this._inDialog = !1),
      (this._mainDivId = "ui-datepicker-div"),
      (this._inlineClass = "ui-datepicker-inline"),
      (this._appendClass = "ui-datepicker-append"),
      (this._triggerClass = "ui-datepicker-trigger"),
      (this._dialogClass = "ui-datepicker-dialog"),
      (this._disableClass = "ui-datepicker-disabled"),
      (this._unselectableClass = "ui-datepicker-unselectable"),
      (this._currentClass = "ui-datepicker-current-day"),
      (this._dayOverClass = "ui-datepicker-days-cell-over"),
      (this.regional = []),
      (this.regional[""] = {
        closeText: "Done",
        prevText: "Prev",
        nextText: "Next",
        currentText: "Today",
        monthNames: [
          "January",
          "February",
          "March",
          "April",
          "May",
          "June",
          "July",
          "August",
          "September",
          "October",
          "November",
          "December",
        ],
        monthNamesShort: [
          "Jan",
          "Feb",
          "Mar",
          "Apr",
          "May",
          "Jun",
          "Jul",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec",
        ],
        dayNames: [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday",
        ],
        dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
        weekHeader: "Wk",
        dateFormat: "mm/dd/yy",
        firstDay: 0,
        isRTL: !1,
        showMonthAfterYear: !1,
        yearSuffix: "",
        selectMonthLabel: "Select month",
        selectYearLabel: "Select year",
      }),
      (this._defaults = {
        showOn: "focus",
        showAnim: "fadeIn",
        showOptions: {},
        defaultDate: null,
        appendText: "",
        buttonText: "...",
        buttonImage: "",
        buttonImageOnly: !1,
        hideIfNoPrevNext: !1,
        navigationAsDateFormat: !1,
        gotoCurrent: !1,
        changeMonth: !1,
        changeYear: !1,
        yearRange: "c-10:c+10",
        showOtherMonths: !1,
        selectOtherMonths: !1,
        showWeek: !1,
        calculateWeek: this.iso8601Week,
        shortYearCutoff: "+10",
        minDate: null,
        maxDate: null,
        duration: "fast",
        beforeShowDay: null,
        beforeShow: null,
        onSelect: null,
        onChangeMonthYear: null,
        onClose: null,
        onUpdateDatepicker: null,
        numberOfMonths: 1,
        showCurrentAtPos: 0,
        stepMonths: 1,
        stepBigMonths: 12,
        altField: "",
        altFormat: "",
        constrainInput: !0,
        showButtonPanel: !1,
        autoSize: !1,
        disabled: !1,
      }),
      Y.extend(this._defaults, this.regional[""]),
      (this.regional.en = Y.extend(!0, {}, this.regional[""])),
      (this.regional["en-US"] = Y.extend(!0, {}, this.regional.en)),
      (this.dpDiv = se(
        Y(
          "<div id='" +
            this._mainDivId +
            "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
        ),
      )));
  }
  function se(e) {
    var t =
      "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
    return e
      .on("mouseout", t, function () {
        (Y(this).removeClass("ui-state-hover"),
          -1 !== this.className.indexOf("ui-datepicker-prev") &&
            Y(this).removeClass("ui-datepicker-prev-hover"),
          -1 !== this.className.indexOf("ui-datepicker-next") &&
            Y(this).removeClass("ui-datepicker-next-hover"));
      })
      .on("mouseover", t, oe);
  }
  function oe() {
    Y.datepicker._isDisabledDatepicker(
      (ie.inline ? ie.dpDiv.parent() : ie.input)[0],
    ) ||
      (Y(this)
        .parents(".ui-datepicker-calendar")
        .find("a")
        .removeClass("ui-state-hover"),
      Y(this).addClass("ui-state-hover"),
      -1 !== this.className.indexOf("ui-datepicker-prev") &&
        Y(this).addClass("ui-datepicker-prev-hover"),
      -1 !== this.className.indexOf("ui-datepicker-next") &&
        Y(this).addClass("ui-datepicker-next-hover"));
  }
  function re(e, t) {
    for (var i in (Y.extend(e, t), t)) null == t[i] && (e[i] = t[i]);
    return e;
  }
  (Y.extend(Y.ui, { datepicker: { version: "1.13.0" } }),
    Y.extend(ne.prototype, {
      markerClassName: "hasDatepicker",
      maxRows: 4,
      _widgetDatepicker: function () {
        return this.dpDiv;
      },
      setDefaults: function (e) {
        return (re(this._defaults, e || {}), this);
      },
      _attachDatepicker: function (e, t) {
        var i,
          n = e.nodeName.toLowerCase(),
          s = "div" === n || "span" === n;
        (e.id || ((this.uuid += 1), (e.id = "dp" + this.uuid)),
          ((i = this._newInst(Y(e), s)).settings = Y.extend({}, t || {})),
          "input" === n
            ? this._connectDatepicker(e, i)
            : s && this._inlineDatepicker(e, i));
      },
      _newInst: function (e, t) {
        return {
          id: e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
          input: e,
          selectedDay: 0,
          selectedMonth: 0,
          selectedYear: 0,
          drawMonth: 0,
          drawYear: 0,
          inline: t,
          dpDiv: t
            ? se(
                Y(
                  "<div class='" +
                    this._inlineClass +
                    " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
                ),
              )
            : this.dpDiv,
        };
      },
      _connectDatepicker: function (e, t) {
        var i = Y(e);
        ((t.append = Y([])),
          (t.trigger = Y([])),
          i.hasClass(this.markerClassName) ||
            (this._attachments(i, t),
            i
              .addClass(this.markerClassName)
              .on("keydown", this._doKeyDown)
              .on("keypress", this._doKeyPress)
              .on("keyup", this._doKeyUp),
            this._autoSize(t),
            Y.data(e, "datepicker", t),
            t.settings.disabled && this._disableDatepicker(e)));
      },
      _attachments: function (e, t) {
        var i,
          n = this._get(t, "appendText"),
          s = this._get(t, "isRTL");
        (t.append && t.append.remove(),
          n &&
            ((t.append = Y("<span>").addClass(this._appendClass).text(n)),
            e[s ? "before" : "after"](t.append)),
          e.off("focus", this._showDatepicker),
          t.trigger && t.trigger.remove(),
          ("focus" !== (i = this._get(t, "showOn")) && "both" !== i) ||
            e.on("focus", this._showDatepicker),
          ("button" !== i && "both" !== i) ||
            ((n = this._get(t, "buttonText")),
            (i = this._get(t, "buttonImage")),
            this._get(t, "buttonImageOnly")
              ? (t.trigger = Y("<img>")
                  .addClass(this._triggerClass)
                  .attr({ src: i, alt: n, title: n }))
              : ((t.trigger = Y("<button type='button'>").addClass(
                  this._triggerClass,
                )),
                i
                  ? t.trigger.html(
                      Y("<img>").attr({ src: i, alt: n, title: n }),
                    )
                  : t.trigger.text(n)),
            e[s ? "before" : "after"](t.trigger),
            t.trigger.on("click", function () {
              return (
                Y.datepicker._datepickerShowing &&
                Y.datepicker._lastInput === e[0]
                  ? Y.datepicker._hideDatepicker()
                  : (Y.datepicker._datepickerShowing &&
                      Y.datepicker._lastInput !== e[0] &&
                      Y.datepicker._hideDatepicker(),
                    Y.datepicker._showDatepicker(e[0])),
                !1
              );
            })));
      },
      _autoSize: function (e) {
        var t, i, n, s, o, r;
        this._get(e, "autoSize") &&
          !e.inline &&
          ((o = new Date(2009, 11, 20)),
          (r = this._get(e, "dateFormat")).match(/[DM]/) &&
            (o.setMonth(
              (t = function (e) {
                for (s = n = i = 0; s < e.length; s++)
                  e[s].length > i && ((i = e[s].length), (n = s));
                return n;
              })(
                this._get(e, r.match(/MM/) ? "monthNames" : "monthNamesShort"),
              ),
            ),
            o.setDate(
              t(this._get(e, r.match(/DD/) ? "dayNames" : "dayNamesShort")) +
                20 -
                o.getDay(),
            )),
          e.input.attr("size", this._formatDate(e, o).length));
      },
      _inlineDatepicker: function (e, t) {
        var i = Y(e);
        i.hasClass(this.markerClassName) ||
          (i.addClass(this.markerClassName).append(t.dpDiv),
          Y.data(e, "datepicker", t),
          this._setDate(t, this._getDefaultDate(t), !0),
          this._updateDatepicker(t),
          this._updateAlternate(t),
          t.settings.disabled && this._disableDatepicker(e),
          t.dpDiv.css("display", "block"));
      },
      _dialogDatepicker: function (e, t, i, n, s) {
        var o,
          r = this._dialogInst;
        return (
          r ||
            ((this.uuid += 1),
            (o = "dp" + this.uuid),
            (this._dialogInput = Y(
              "<input type='text' id='" +
                o +
                "' style='position: absolute; top: -100px; width: 0px;'/>",
            )),
            this._dialogInput.on("keydown", this._doKeyDown),
            Y("body").append(this._dialogInput),
            ((r = this._dialogInst =
              this._newInst(this._dialogInput, !1)).settings = {}),
            Y.data(this._dialogInput[0], "datepicker", r)),
          re(r.settings, n || {}),
          (t = t && t.constructor === Date ? this._formatDate(r, t) : t),
          this._dialogInput.val(t),
          (this._pos = s ? (s.length ? s : [s.pageX, s.pageY]) : null),
          this._pos ||
            ((o = document.documentElement.clientWidth),
            (n = document.documentElement.clientHeight),
            (t =
              document.documentElement.scrollLeft || document.body.scrollLeft),
            (s = document.documentElement.scrollTop || document.body.scrollTop),
            (this._pos = [o / 2 - 100 + t, n / 2 - 150 + s])),
          this._dialogInput
            .css("left", this._pos[0] + 20 + "px")
            .css("top", this._pos[1] + "px"),
          (r.settings.onSelect = i),
          (this._inDialog = !0),
          this.dpDiv.addClass(this._dialogClass),
          this._showDatepicker(this._dialogInput[0]),
          Y.blockUI && Y.blockUI(this.dpDiv),
          Y.data(this._dialogInput[0], "datepicker", r),
          this
        );
      },
      _destroyDatepicker: function (e) {
        var t,
          i = Y(e),
          n = Y.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ((t = e.nodeName.toLowerCase()),
          Y.removeData(e, "datepicker"),
          "input" === t
            ? (n.append.remove(),
              n.trigger.remove(),
              i
                .removeClass(this.markerClassName)
                .off("focus", this._showDatepicker)
                .off("keydown", this._doKeyDown)
                .off("keypress", this._doKeyPress)
                .off("keyup", this._doKeyUp))
            : ("div" !== t && "span" !== t) ||
              i.removeClass(this.markerClassName).empty(),
          ie === n && ((ie = null), (this._curInst = null)));
      },
      _enableDatepicker: function (t) {
        var e,
          i = Y(t),
          n = Y.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (e = t.nodeName.toLowerCase())
            ? ((t.disabled = !1),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !1;
                })
                .end()
                .filter("img")
                .css({ opacity: "1.0", cursor: "" }))
            : ("div" !== e && "span" !== e) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .removeClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !1)),
          (this._disabledInputs = Y.map(this._disabledInputs, function (e) {
            return e === t ? null : e;
          })));
      },
      _disableDatepicker: function (t) {
        var e,
          i = Y(t),
          n = Y.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (e = t.nodeName.toLowerCase())
            ? ((t.disabled = !0),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !0;
                })
                .end()
                .filter("img")
                .css({ opacity: "0.5", cursor: "default" }))
            : ("div" !== e && "span" !== e) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .addClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !0)),
          (this._disabledInputs = Y.map(this._disabledInputs, function (e) {
            return e === t ? null : e;
          })),
          (this._disabledInputs[this._disabledInputs.length] = t));
      },
      _isDisabledDatepicker: function (e) {
        if (!e) return !1;
        for (var t = 0; t < this._disabledInputs.length; t++)
          if (this._disabledInputs[t] === e) return !0;
        return !1;
      },
      _getInst: function (e) {
        try {
          return Y.data(e, "datepicker");
        } catch (e) {
          throw "Missing instance data for this datepicker";
        }
      },
      _optionDatepicker: function (e, t, i) {
        var n,
          s,
          o = this._getInst(e);
        if (2 === arguments.length && "string" == typeof t)
          return "defaults" === t
            ? Y.extend({}, Y.datepicker._defaults)
            : o
              ? "all" === t
                ? Y.extend({}, o.settings)
                : this._get(o, t)
              : null;
        ((n = t || {}),
          "string" == typeof t && ((n = {})[t] = i),
          o &&
            (this._curInst === o && this._hideDatepicker(),
            (s = this._getDateDatepicker(e, !0)),
            (t = this._getMinMaxDate(o, "min")),
            (i = this._getMinMaxDate(o, "max")),
            re(o.settings, n),
            null !== t &&
              void 0 !== n.dateFormat &&
              void 0 === n.minDate &&
              (o.settings.minDate = this._formatDate(o, t)),
            null !== i &&
              void 0 !== n.dateFormat &&
              void 0 === n.maxDate &&
              (o.settings.maxDate = this._formatDate(o, i)),
            "disabled" in n &&
              (n.disabled
                ? this._disableDatepicker(e)
                : this._enableDatepicker(e)),
            this._attachments(Y(e), o),
            this._autoSize(o),
            this._setDate(o, s),
            this._updateAlternate(o),
            this._updateDatepicker(o)));
      },
      _changeDatepicker: function (e, t, i) {
        this._optionDatepicker(e, t, i);
      },
      _refreshDatepicker: function (e) {
        e = this._getInst(e);
        e && this._updateDatepicker(e);
      },
      _setDateDatepicker: function (e, t) {
        e = this._getInst(e);
        e &&
          (this._setDate(e, t),
          this._updateDatepicker(e),
          this._updateAlternate(e));
      },
      _getDateDatepicker: function (e, t) {
        e = this._getInst(e);
        return (
          e && !e.inline && this._setDateFromField(e, t),
          e ? this._getDate(e) : null
        );
      },
      _doKeyDown: function (e) {
        var t,
          i,
          n = Y.datepicker._getInst(e.target),
          s = !0,
          o = n.dpDiv.is(".ui-datepicker-rtl");
        if (((n._keyEvent = !0), Y.datepicker._datepickerShowing))
          switch (e.keyCode) {
            case 9:
              (Y.datepicker._hideDatepicker(), (s = !1));
              break;
            case 13:
              return (
                (i = Y(
                  "td." +
                    Y.datepicker._dayOverClass +
                    ":not(." +
                    Y.datepicker._currentClass +
                    ")",
                  n.dpDiv,
                ))[0] &&
                  Y.datepicker._selectDay(
                    e.target,
                    n.selectedMonth,
                    n.selectedYear,
                    i[0],
                  ),
                (t = Y.datepicker._get(n, "onSelect"))
                  ? ((i = Y.datepicker._formatDate(n)),
                    t.apply(n.input ? n.input[0] : null, [i, n]))
                  : Y.datepicker._hideDatepicker(),
                !1
              );
            case 27:
              Y.datepicker._hideDatepicker();
              break;
            case 33:
              Y.datepicker._adjustDate(
                e.target,
                e.ctrlKey
                  ? -Y.datepicker._get(n, "stepBigMonths")
                  : -Y.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 34:
              Y.datepicker._adjustDate(
                e.target,
                e.ctrlKey
                  ? +Y.datepicker._get(n, "stepBigMonths")
                  : +Y.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 35:
              ((e.ctrlKey || e.metaKey) && Y.datepicker._clearDate(e.target),
                (s = e.ctrlKey || e.metaKey));
              break;
            case 36:
              ((e.ctrlKey || e.metaKey) && Y.datepicker._gotoToday(e.target),
                (s = e.ctrlKey || e.metaKey));
              break;
            case 37:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, o ? 1 : -1, "D"),
                (s = e.ctrlKey || e.metaKey),
                e.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    e.target,
                    e.ctrlKey
                      ? -Y.datepicker._get(n, "stepBigMonths")
                      : -Y.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 38:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, -7, "D"),
                (s = e.ctrlKey || e.metaKey));
              break;
            case 39:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, o ? -1 : 1, "D"),
                (s = e.ctrlKey || e.metaKey),
                e.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    e.target,
                    e.ctrlKey
                      ? +Y.datepicker._get(n, "stepBigMonths")
                      : +Y.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 40:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, 7, "D"),
                (s = e.ctrlKey || e.metaKey));
              break;
            default:
              s = !1;
          }
        else
          36 === e.keyCode && e.ctrlKey
            ? Y.datepicker._showDatepicker(this)
            : (s = !1);
        s && (e.preventDefault(), e.stopPropagation());
      },
      _doKeyPress: function (e) {
        var t,
          i = Y.datepicker._getInst(e.target);
        if (Y.datepicker._get(i, "constrainInput"))
          return (
            (t = Y.datepicker._possibleChars(
              Y.datepicker._get(i, "dateFormat"),
            )),
            (i = String.fromCharCode(
              null == e.charCode ? e.keyCode : e.charCode,
            )),
            e.ctrlKey || e.metaKey || i < " " || !t || -1 < t.indexOf(i)
          );
      },
      _doKeyUp: function (e) {
        e = Y.datepicker._getInst(e.target);
        if (e.input.val() !== e.lastVal)
          try {
            Y.datepicker.parseDate(
              Y.datepicker._get(e, "dateFormat"),
              e.input ? e.input.val() : null,
              Y.datepicker._getFormatConfig(e),
            ) &&
              (Y.datepicker._setDateFromField(e),
              Y.datepicker._updateAlternate(e),
              Y.datepicker._updateDatepicker(e));
          } catch (e) {}
        return !0;
      },
      _showDatepicker: function (e) {
        var t, i, n, s;
        ("input" !== (e = e.target || e).nodeName.toLowerCase() &&
          (e = Y("input", e.parentNode)[0]),
          Y.datepicker._isDisabledDatepicker(e) ||
            Y.datepicker._lastInput === e ||
            ((s = Y.datepicker._getInst(e)),
            Y.datepicker._curInst &&
              Y.datepicker._curInst !== s &&
              (Y.datepicker._curInst.dpDiv.stop(!0, !0),
              s &&
                Y.datepicker._datepickerShowing &&
                Y.datepicker._hideDatepicker(Y.datepicker._curInst.input[0])),
            !1 !==
              (i = (n = Y.datepicker._get(s, "beforeShow"))
                ? n.apply(e, [e, s])
                : {}) &&
              (re(s.settings, i),
              (s.lastVal = null),
              (Y.datepicker._lastInput = e),
              Y.datepicker._setDateFromField(s),
              Y.datepicker._inDialog && (e.value = ""),
              Y.datepicker._pos ||
                ((Y.datepicker._pos = Y.datepicker._findPos(e)),
                (Y.datepicker._pos[1] += e.offsetHeight)),
              (t = !1),
              Y(e)
                .parents()
                .each(function () {
                  return !(t |= "fixed" === Y(this).css("position"));
                }),
              (n = { left: Y.datepicker._pos[0], top: Y.datepicker._pos[1] }),
              (Y.datepicker._pos = null),
              s.dpDiv.empty(),
              s.dpDiv.css({
                position: "absolute",
                display: "block",
                top: "-1000px",
              }),
              Y.datepicker._updateDatepicker(s),
              (n = Y.datepicker._checkOffset(s, n, t)),
              s.dpDiv.css({
                position:
                  Y.datepicker._inDialog && Y.blockUI
                    ? "static"
                    : t
                      ? "fixed"
                      : "absolute",
                display: "none",
                left: n.left + "px",
                top: n.top + "px",
              }),
              s.inline ||
                ((i = Y.datepicker._get(s, "showAnim")),
                (n = Y.datepicker._get(s, "duration")),
                s.dpDiv.css(
                  "z-index",
                  (function (e) {
                    for (var t, i; e.length && e[0] !== document; ) {
                      if (
                        ("absolute" === (t = e.css("position")) ||
                          "relative" === t ||
                          "fixed" === t) &&
                        ((i = parseInt(e.css("zIndex"), 10)),
                        !isNaN(i) && 0 !== i)
                      )
                        return i;
                      e = e.parent();
                    }
                    return 0;
                  })(Y(e)) + 1,
                ),
                (Y.datepicker._datepickerShowing = !0),
                Y.effects && Y.effects.effect[i]
                  ? s.dpDiv.show(i, Y.datepicker._get(s, "showOptions"), n)
                  : s.dpDiv[i || "show"](i ? n : null),
                Y.datepicker._shouldFocusInput(s) && s.input.trigger("focus"),
                (Y.datepicker._curInst = s)))));
      },
      _updateDatepicker: function (e) {
        ((this.maxRows = 4),
          (ie = e).dpDiv.empty().append(this._generateHTML(e)),
          this._attachHandlers(e));
        var t,
          i = this._getNumberOfMonths(e),
          n = i[1],
          s = e.dpDiv.find("." + this._dayOverClass + " a"),
          o = Y.datepicker._get(e, "onUpdateDatepicker");
        (0 < s.length && oe.apply(s.get(0)),
          e.dpDiv
            .removeClass(
              "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4",
            )
            .width(""),
          1 < n &&
            e.dpDiv
              .addClass("ui-datepicker-multi-" + n)
              .css("width", 17 * n + "em"),
          e.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"](
            "ui-datepicker-multi",
          ),
          e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"](
            "ui-datepicker-rtl",
          ),
          e === Y.datepicker._curInst &&
            Y.datepicker._datepickerShowing &&
            Y.datepicker._shouldFocusInput(e) &&
            e.input.trigger("focus"),
          e.yearshtml &&
            ((t = e.yearshtml),
            setTimeout(function () {
              (t === e.yearshtml &&
                e.yearshtml &&
                e.dpDiv
                  .find("select.ui-datepicker-year")
                  .first()
                  .replaceWith(e.yearshtml),
                (t = e.yearshtml = null));
            }, 0)),
          o && o.apply(e.input ? e.input[0] : null, [e]));
      },
      _shouldFocusInput: function (e) {
        return (
          e.input &&
          e.input.is(":visible") &&
          !e.input.is(":disabled") &&
          !e.input.is(":focus")
        );
      },
      _checkOffset: function (e, t, i) {
        var n = e.dpDiv.outerWidth(),
          s = e.dpDiv.outerHeight(),
          o = e.input ? e.input.outerWidth() : 0,
          r = e.input ? e.input.outerHeight() : 0,
          a =
            document.documentElement.clientWidth +
            (i ? 0 : Y(document).scrollLeft()),
          l =
            document.documentElement.clientHeight +
            (i ? 0 : Y(document).scrollTop());
        return (
          (t.left -= this._get(e, "isRTL") ? n - o : 0),
          (t.left -=
            i && t.left === e.input.offset().left
              ? Y(document).scrollLeft()
              : 0),
          (t.top -=
            i && t.top === e.input.offset().top + r
              ? Y(document).scrollTop()
              : 0),
          (t.left -= Math.min(
            t.left,
            t.left + n > a && n < a ? Math.abs(t.left + n - a) : 0,
          )),
          (t.top -= Math.min(
            t.top,
            t.top + s > l && s < l ? Math.abs(s + r) : 0,
          )),
          t
        );
      },
      _findPos: function (e) {
        for (
          var t = this._getInst(e), i = this._get(t, "isRTL");
          e &&
          ("hidden" === e.type || 1 !== e.nodeType || Y.expr.pseudos.hidden(e));

        )
          e = e[i ? "previousSibling" : "nextSibling"];
        return [(t = Y(e).offset()).left, t.top];
      },
      _hideDatepicker: function (e) {
        var t,
          i,
          n = this._curInst;
        !n ||
          (e && n !== Y.data(e, "datepicker")) ||
          (this._datepickerShowing &&
            ((t = this._get(n, "showAnim")),
            (i = this._get(n, "duration")),
            (e = function () {
              Y.datepicker._tidyDialog(n);
            }),
            Y.effects && (Y.effects.effect[t] || Y.effects[t])
              ? n.dpDiv.hide(t, Y.datepicker._get(n, "showOptions"), i, e)
              : n.dpDiv[
                  "slideDown" === t
                    ? "slideUp"
                    : "fadeIn" === t
                      ? "fadeOut"
                      : "hide"
                ](t ? i : null, e),
            t || e(),
            (this._datepickerShowing = !1),
            (e = this._get(n, "onClose")) &&
              e.apply(n.input ? n.input[0] : null, [
                n.input ? n.input.val() : "",
                n,
              ]),
            (this._lastInput = null),
            this._inDialog &&
              (this._dialogInput.css({
                position: "absolute",
                left: "0",
                top: "-100px",
              }),
              Y.blockUI && (Y.unblockUI(), Y("body").append(this.dpDiv))),
            (this._inDialog = !1)));
      },
      _tidyDialog: function (e) {
        e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
      },
      _checkExternalClick: function (e) {
        var t;
        Y.datepicker._curInst &&
          ((t = Y(e.target)),
          (e = Y.datepicker._getInst(t[0])),
          ((t[0].id === Y.datepicker._mainDivId ||
            0 !== t.parents("#" + Y.datepicker._mainDivId).length ||
            t.hasClass(Y.datepicker.markerClassName) ||
            t.closest("." + Y.datepicker._triggerClass).length ||
            !Y.datepicker._datepickerShowing ||
            (Y.datepicker._inDialog && Y.blockUI)) &&
            (!t.hasClass(Y.datepicker.markerClassName) ||
              Y.datepicker._curInst === e)) ||
            Y.datepicker._hideDatepicker());
      },
      _adjustDate: function (e, t, i) {
        var n = Y(e),
          e = this._getInst(n[0]);
        this._isDisabledDatepicker(n[0]) ||
          (this._adjustInstDate(e, t, i), this._updateDatepicker(e));
      },
      _gotoToday: function (e) {
        var t = Y(e),
          i = this._getInst(t[0]);
        (this._get(i, "gotoCurrent") && i.currentDay
          ? ((i.selectedDay = i.currentDay),
            (i.drawMonth = i.selectedMonth = i.currentMonth),
            (i.drawYear = i.selectedYear = i.currentYear))
          : ((e = new Date()),
            (i.selectedDay = e.getDate()),
            (i.drawMonth = i.selectedMonth = e.getMonth()),
            (i.drawYear = i.selectedYear = e.getFullYear())),
          this._notifyChange(i),
          this._adjustDate(t));
      },
      _selectMonthYear: function (e, t, i) {
        var n = Y(e),
          e = this._getInst(n[0]);
        ((e["selected" + ("M" === i ? "Month" : "Year")] = e[
          "draw" + ("M" === i ? "Month" : "Year")
        ] =
          parseInt(t.options[t.selectedIndex].value, 10)),
          this._notifyChange(e),
          this._adjustDate(n));
      },
      _selectDay: function (e, t, i, n) {
        var s = Y(e);
        Y(n).hasClass(this._unselectableClass) ||
          this._isDisabledDatepicker(s[0]) ||
          (((s = this._getInst(s[0])).selectedDay = s.currentDay =
            parseInt(Y("a", n).attr("data-date"))),
          (s.selectedMonth = s.currentMonth = t),
          (s.selectedYear = s.currentYear = i),
          this._selectDate(
            e,
            this._formatDate(s, s.currentDay, s.currentMonth, s.currentYear),
          ));
      },
      _clearDate: function (e) {
        e = Y(e);
        this._selectDate(e, "");
      },
      _selectDate: function (e, t) {
        var i = Y(e),
          e = this._getInst(i[0]);
        ((t = null != t ? t : this._formatDate(e)),
          e.input && e.input.val(t),
          this._updateAlternate(e),
          (i = this._get(e, "onSelect"))
            ? i.apply(e.input ? e.input[0] : null, [t, e])
            : e.input && e.input.trigger("change"),
          e.inline
            ? this._updateDatepicker(e)
            : (this._hideDatepicker(),
              (this._lastInput = e.input[0]),
              "object" != typeof e.input[0] && e.input.trigger("focus"),
              (this._lastInput = null)));
      },
      _updateAlternate: function (e) {
        var t,
          i,
          n = this._get(e, "altField");
        n &&
          ((t = this._get(e, "altFormat") || this._get(e, "dateFormat")),
          (i = this._getDate(e)),
          (e = this.formatDate(t, i, this._getFormatConfig(e))),
          Y(document).find(n).val(e));
      },
      noWeekends: function (e) {
        e = e.getDay();
        return [0 < e && e < 6, ""];
      },
      iso8601Week: function (e) {
        var t = new Date(e.getTime());
        return (
          t.setDate(t.getDate() + 4 - (t.getDay() || 7)),
          (e = t.getTime()),
          t.setMonth(0),
          t.setDate(1),
          Math.floor(Math.round((e - t) / 864e5) / 7) + 1
        );
      },
      parseDate: function (t, s, e) {
        if (null == t || null == s) throw "Invalid arguments";
        if ("" === (s = "object" == typeof s ? s.toString() : s + ""))
          return null;
        for (
          var i,
            n,
            o,
            r = 0,
            a =
              (e ? e.shortYearCutoff : null) || this._defaults.shortYearCutoff,
            a =
              "string" != typeof a
                ? a
                : (new Date().getFullYear() % 100) + parseInt(a, 10),
            l = (e ? e.dayNamesShort : null) || this._defaults.dayNamesShort,
            h = (e ? e.dayNames : null) || this._defaults.dayNames,
            c =
              (e ? e.monthNamesShort : null) || this._defaults.monthNamesShort,
            u = (e ? e.monthNames : null) || this._defaults.monthNames,
            d = -1,
            p = -1,
            f = -1,
            g = -1,
            m = !1,
            v = function (e) {
              e = w + 1 < t.length && t.charAt(w + 1) === e;
              return (e && w++, e);
            },
            b = function (e) {
              var t = v(e),
                t =
                  "@" === e
                    ? 14
                    : "!" === e
                      ? 20
                      : "y" === e && t
                        ? 4
                        : "o" === e
                          ? 3
                          : 2,
                t = new RegExp("^\\d{" + ("y" === e ? t : 1) + "," + t + "}"),
                t = s.substring(r).match(t);
              if (!t) throw "Missing number at position " + r;
              return ((r += t[0].length), parseInt(t[0], 10));
            },
            y = function (e, t, i) {
              var n = -1,
                t = Y.map(v(e) ? i : t, function (e, t) {
                  return [[t, e]];
                }).sort(function (e, t) {
                  return -(e[1].length - t[1].length);
                });
              if (
                (Y.each(t, function (e, t) {
                  var i = t[1];
                  if (s.substr(r, i.length).toLowerCase() === i.toLowerCase())
                    return ((n = t[0]), (r += i.length), !1);
                }),
                -1 !== n)
              )
                return n + 1;
              throw "Unknown name at position " + r;
            },
            _ = function () {
              if (s.charAt(r) !== t.charAt(w))
                throw "Unexpected literal at position " + r;
              r++;
            },
            w = 0;
          w < t.length;
          w++
        )
          if (m) "'" !== t.charAt(w) || v("'") ? _() : (m = !1);
          else
            switch (t.charAt(w)) {
              case "d":
                f = b("d");
                break;
              case "D":
                y("D", l, h);
                break;
              case "o":
                g = b("o");
                break;
              case "m":
                p = b("m");
                break;
              case "M":
                p = y("M", c, u);
                break;
              case "y":
                d = b("y");
                break;
              case "@":
                ((d = (o = new Date(b("@"))).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate()));
                break;
              case "!":
                ((d = (o = new Date(
                  (b("!") - this._ticksTo1970) / 1e4,
                )).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate()));
                break;
              case "'":
                v("'") ? _() : (m = !0);
                break;
              default:
                _();
            }
        if (r < s.length && ((n = s.substr(r)), !/^\s+/.test(n)))
          throw "Extra/unparsed characters found in date: " + n;
        if (
          (-1 === d
            ? (d = new Date().getFullYear())
            : d < 100 &&
              (d +=
                new Date().getFullYear() -
                (new Date().getFullYear() % 100) +
                (d <= a ? 0 : -100)),
          -1 < g)
        )
          for (p = 1, f = g; ; ) {
            if (f <= (i = this._getDaysInMonth(d, p - 1))) break;
            (p++, (f -= i));
          }
        if (
          (o = this._daylightSavingAdjust(
            new Date(d, p - 1, f),
          )).getFullYear() !== d ||
          o.getMonth() + 1 !== p ||
          o.getDate() !== f
        )
          throw "Invalid date";
        return o;
      },
      ATOM: "yy-mm-dd",
      COOKIE: "D, dd M yy",
      ISO_8601: "yy-mm-dd",
      RFC_822: "D, d M y",
      RFC_850: "DD, dd-M-y",
      RFC_1036: "D, d M y",
      RFC_1123: "D, d M yy",
      RFC_2822: "D, d M yy",
      RSS: "D, d M y",
      TICKS: "!",
      TIMESTAMP: "@",
      W3C: "yy-mm-dd",
      _ticksTo1970:
        24 *
        (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) *
        60 *
        60 *
        1e7,
      formatDate: function (t, e, i) {
        if (!e) return "";
        function n(e, t, i) {
          var n = "" + t;
          if (c(e)) for (; n.length < i; ) n = "0" + n;
          return n;
        }
        function s(e, t, i, n) {
          return (c(e) ? n : i)[t];
        }
        var o,
          r = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,
          a = (i ? i.dayNames : null) || this._defaults.dayNames,
          l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,
          h = (i ? i.monthNames : null) || this._defaults.monthNames,
          c = function (e) {
            e = o + 1 < t.length && t.charAt(o + 1) === e;
            return (e && o++, e);
          },
          u = "",
          d = !1;
        if (e)
          for (o = 0; o < t.length; o++)
            if (d)
              "'" !== t.charAt(o) || c("'") ? (u += t.charAt(o)) : (d = !1);
            else
              switch (t.charAt(o)) {
                case "d":
                  u += n("d", e.getDate(), 2);
                  break;
                case "D":
                  u += s("D", e.getDay(), r, a);
                  break;
                case "o":
                  u += n(
                    "o",
                    Math.round(
                      (new Date(
                        e.getFullYear(),
                        e.getMonth(),
                        e.getDate(),
                      ).getTime() -
                        new Date(e.getFullYear(), 0, 0).getTime()) /
                        864e5,
                    ),
                    3,
                  );
                  break;
                case "m":
                  u += n("m", e.getMonth() + 1, 2);
                  break;
                case "M":
                  u += s("M", e.getMonth(), l, h);
                  break;
                case "y":
                  u += c("y")
                    ? e.getFullYear()
                    : (e.getFullYear() % 100 < 10 ? "0" : "") +
                      (e.getFullYear() % 100);
                  break;
                case "@":
                  u += e.getTime();
                  break;
                case "!":
                  u += 1e4 * e.getTime() + this._ticksTo1970;
                  break;
                case "'":
                  c("'") ? (u += "'") : (d = !0);
                  break;
                default:
                  u += t.charAt(o);
              }
        return u;
      },
      _possibleChars: function (t) {
        for (
          var e = "",
            i = !1,
            n = function (e) {
              e = s + 1 < t.length && t.charAt(s + 1) === e;
              return (e && s++, e);
            },
            s = 0;
          s < t.length;
          s++
        )
          if (i) "'" !== t.charAt(s) || n("'") ? (e += t.charAt(s)) : (i = !1);
          else
            switch (t.charAt(s)) {
              case "d":
              case "m":
              case "y":
              case "@":
                e += "0123456789";
                break;
              case "D":
              case "M":
                return null;
              case "'":
                n("'") ? (e += "'") : (i = !0);
                break;
              default:
                e += t.charAt(s);
            }
        return e;
      },
      _get: function (e, t) {
        return (void 0 !== e.settings[t] ? e.settings : this._defaults)[t];
      },
      _setDateFromField: function (e, t) {
        if (e.input.val() !== e.lastVal) {
          var i = this._get(e, "dateFormat"),
            n = (e.lastVal = e.input ? e.input.val() : null),
            s = this._getDefaultDate(e),
            o = s,
            r = this._getFormatConfig(e);
          try {
            o = this.parseDate(i, n, r) || s;
          } catch (e) {
            n = t ? "" : n;
          }
          ((e.selectedDay = o.getDate()),
            (e.drawMonth = e.selectedMonth = o.getMonth()),
            (e.drawYear = e.selectedYear = o.getFullYear()),
            (e.currentDay = n ? o.getDate() : 0),
            (e.currentMonth = n ? o.getMonth() : 0),
            (e.currentYear = n ? o.getFullYear() : 0),
            this._adjustInstDate(e));
        }
      },
      _getDefaultDate: function (e) {
        return this._restrictMinMax(
          e,
          this._determineDate(e, this._get(e, "defaultDate"), new Date()),
        );
      },
      _determineDate: function (a, e, t) {
        var i,
          n,
          e =
            null == e || "" === e
              ? t
              : "string" == typeof e
                ? (function (e) {
                    try {
                      return Y.datepicker.parseDate(
                        Y.datepicker._get(a, "dateFormat"),
                        e,
                        Y.datepicker._getFormatConfig(a),
                      );
                    } catch (e) {}
                    for (
                      var t =
                          (e.toLowerCase().match(/^c/)
                            ? Y.datepicker._getDate(a)
                            : null) || new Date(),
                        i = t.getFullYear(),
                        n = t.getMonth(),
                        s = t.getDate(),
                        o = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
                        r = o.exec(e);
                      r;

                    ) {
                      switch (r[2] || "d") {
                        case "d":
                        case "D":
                          s += parseInt(r[1], 10);
                          break;
                        case "w":
                        case "W":
                          s += 7 * parseInt(r[1], 10);
                          break;
                        case "m":
                        case "M":
                          ((n += parseInt(r[1], 10)),
                            (s = Math.min(
                              s,
                              Y.datepicker._getDaysInMonth(i, n),
                            )));
                          break;
                        case "y":
                        case "Y":
                          ((i += parseInt(r[1], 10)),
                            (s = Math.min(
                              s,
                              Y.datepicker._getDaysInMonth(i, n),
                            )));
                      }
                      r = o.exec(e);
                    }
                    return new Date(i, n, s);
                  })(e)
                : "number" == typeof e
                  ? isNaN(e)
                    ? t
                    : ((i = e), (n = new Date()).setDate(n.getDate() + i), n)
                  : new Date(e.getTime());
        return (
          (e = e && "Invalid Date" === e.toString() ? t : e) &&
            (e.setHours(0),
            e.setMinutes(0),
            e.setSeconds(0),
            e.setMilliseconds(0)),
          this._daylightSavingAdjust(e)
        );
      },
      _daylightSavingAdjust: function (e) {
        return e
          ? (e.setHours(12 < e.getHours() ? e.getHours() + 2 : 0), e)
          : null;
      },
      _setDate: function (e, t, i) {
        var n = !t,
          s = e.selectedMonth,
          o = e.selectedYear,
          t = this._restrictMinMax(e, this._determineDate(e, t, new Date()));
        ((e.selectedDay = e.currentDay = t.getDate()),
          (e.drawMonth = e.selectedMonth = e.currentMonth = t.getMonth()),
          (e.drawYear = e.selectedYear = e.currentYear = t.getFullYear()),
          (s === e.selectedMonth && o === e.selectedYear) ||
            i ||
            this._notifyChange(e),
          this._adjustInstDate(e),
          e.input && e.input.val(n ? "" : this._formatDate(e)));
      },
      _getDate: function (e) {
        return !e.currentYear || (e.input && "" === e.input.val())
          ? null
          : this._daylightSavingAdjust(
              new Date(e.currentYear, e.currentMonth, e.currentDay),
            );
      },
      _attachHandlers: function (e) {
        var t = this._get(e, "stepMonths"),
          i = "#" + e.id.replace(/\\\\/g, "\\");
        e.dpDiv.find("[data-handler]").map(function () {
          var e = {
            prev: function () {
              Y.datepicker._adjustDate(i, -t, "M");
            },
            next: function () {
              Y.datepicker._adjustDate(i, +t, "M");
            },
            hide: function () {
              Y.datepicker._hideDatepicker();
            },
            today: function () {
              Y.datepicker._gotoToday(i);
            },
            selectDay: function () {
              return (
                Y.datepicker._selectDay(
                  i,
                  +this.getAttribute("data-month"),
                  +this.getAttribute("data-year"),
                  this,
                ),
                !1
              );
            },
            selectMonth: function () {
              return (Y.datepicker._selectMonthYear(i, this, "M"), !1);
            },
            selectYear: function () {
              return (Y.datepicker._selectMonthYear(i, this, "Y"), !1);
            },
          };
          Y(this).on(
            this.getAttribute("data-event"),
            e[this.getAttribute("data-handler")],
          );
        });
      },
      _generateHTML: function (e) {
        var t,
          i,
          n,
          s,
          o,
          r,
          a,
          l,
          h,
          c,
          u,
          d,
          p,
          f,
          g,
          m,
          v,
          b,
          y,
          _,
          w,
          x,
          P,
          C,
          k,
          T,
          H,
          D,
          I,
          S,
          E,
          A,
          M = new Date(),
          O = this._daylightSavingAdjust(
            new Date(M.getFullYear(), M.getMonth(), M.getDate()),
          ),
          N = this._get(e, "isRTL"),
          L = this._get(e, "showButtonPanel"),
          z = this._get(e, "hideIfNoPrevNext"),
          j = this._get(e, "navigationAsDateFormat"),
          F = this._getNumberOfMonths(e),
          R = this._get(e, "showCurrentAtPos"),
          M = this._get(e, "stepMonths"),
          $ = 1 !== F[0] || 1 !== F[1],
          q = this._daylightSavingAdjust(
            e.currentDay
              ? new Date(e.currentYear, e.currentMonth, e.currentDay)
              : new Date(9999, 9, 9),
          ),
          W = this._getMinMaxDate(e, "min"),
          B = this._getMinMaxDate(e, "max"),
          U = e.drawMonth - R,
          V = e.drawYear;
        if ((U < 0 && ((U += 12), V--), B))
          for (
            t = this._daylightSavingAdjust(
              new Date(
                B.getFullYear(),
                B.getMonth() - F[0] * F[1] + 1,
                B.getDate(),
              ),
            ),
              t = W && t < W ? W : t;
            this._daylightSavingAdjust(new Date(V, U, 1)) > t;

          )
            --U < 0 && ((U = 11), V--);
        for (
          e.drawMonth = U,
            e.drawYear = V,
            R = this._get(e, "prevText"),
            R = j
              ? this.formatDate(
                  R,
                  this._daylightSavingAdjust(new Date(V, U - M, 1)),
                  this._getFormatConfig(e),
                )
              : R,
            i = this._canAdjustMonth(e, -1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-prev ui-corner-all",
                    "data-handler": "prev",
                    "data-event": "click",
                    title: R,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (N ? "e" : "w"),
                      )
                      .text(R),
                  )[0].outerHTML
              : z
                ? ""
                : Y("<a>")
                    .attr({
                      class:
                        "ui-datepicker-prev ui-corner-all ui-state-disabled",
                      title: R,
                    })
                    .append(
                      Y("<span>")
                        .addClass(
                          "ui-icon ui-icon-circle-triangle-" + (N ? "e" : "w"),
                        )
                        .text(R),
                    )[0].outerHTML,
            R = this._get(e, "nextText"),
            R = j
              ? this.formatDate(
                  R,
                  this._daylightSavingAdjust(new Date(V, U + M, 1)),
                  this._getFormatConfig(e),
                )
              : R,
            n = this._canAdjustMonth(e, 1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-next ui-corner-all",
                    "data-handler": "next",
                    "data-event": "click",
                    title: R,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (N ? "w" : "e"),
                      )
                      .text(R),
                  )[0].outerHTML
              : z
                ? ""
                : Y("<a>")
                    .attr({
                      class:
                        "ui-datepicker-next ui-corner-all ui-state-disabled",
                      title: R,
                    })
                    .append(
                      Y("<span>")
                        .attr(
                          "class",
                          "ui-icon ui-icon-circle-triangle-" + (N ? "w" : "e"),
                        )
                        .text(R),
                    )[0].outerHTML,
            M = this._get(e, "currentText"),
            z = this._get(e, "gotoCurrent") && e.currentDay ? q : O,
            M = j ? this.formatDate(M, z, this._getFormatConfig(e)) : M,
            R = "",
            e.inline ||
              (R = Y("<button>")
                .attr({
                  type: "button",
                  class:
                    "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
                  "data-handler": "hide",
                  "data-event": "click",
                })
                .text(this._get(e, "closeText"))[0].outerHTML),
            j = "",
            L &&
              (j = Y("<div class='ui-datepicker-buttonpane ui-widget-content'>")
                .append(N ? R : "")
                .append(
                  this._isInRange(e, z)
                    ? Y("<button>")
                        .attr({
                          type: "button",
                          class:
                            "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
                          "data-handler": "today",
                          "data-event": "click",
                        })
                        .text(M)
                    : "",
                )
                .append(N ? "" : R)[0].outerHTML),
            s = parseInt(this._get(e, "firstDay"), 10),
            s = isNaN(s) ? 0 : s,
            o = this._get(e, "showWeek"),
            r = this._get(e, "dayNames"),
            a = this._get(e, "dayNamesMin"),
            l = this._get(e, "monthNames"),
            h = this._get(e, "monthNamesShort"),
            c = this._get(e, "beforeShowDay"),
            u = this._get(e, "showOtherMonths"),
            d = this._get(e, "selectOtherMonths"),
            p = this._getDefaultDate(e),
            f = "",
            m = 0;
          m < F[0];
          m++
        ) {
          for (v = "", this.maxRows = 4, b = 0; b < F[1]; b++) {
            if (
              ((y = this._daylightSavingAdjust(new Date(V, U, e.selectedDay))),
              (_ = " ui-corner-all"),
              (w = ""),
              $)
            ) {
              if (((w += "<div class='ui-datepicker-group"), 1 < F[1]))
                switch (b) {
                  case 0:
                    ((w += " ui-datepicker-group-first"),
                      (_ = " ui-corner-" + (N ? "right" : "left")));
                    break;
                  case F[1] - 1:
                    ((w += " ui-datepicker-group-last"),
                      (_ = " ui-corner-" + (N ? "left" : "right")));
                    break;
                  default:
                    ((w += " ui-datepicker-group-middle"), (_ = ""));
                }
              w += "'>";
            }
            for (
              w +=
                "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" +
                _ +
                "'>" +
                (/all|left/.test(_) && 0 === m ? (N ? n : i) : "") +
                (/all|right/.test(_) && 0 === m ? (N ? i : n) : "") +
                this._generateMonthYearHeader(
                  e,
                  U,
                  V,
                  W,
                  B,
                  0 < m || 0 < b,
                  l,
                  h,
                ) +
                "</div><table class='ui-datepicker-calendar'><thead><tr>",
                x = o
                  ? "<th class='ui-datepicker-week-col'>" +
                    this._get(e, "weekHeader") +
                    "</th>"
                  : "",
                g = 0;
              g < 7;
              g++
            )
              x +=
                "<th scope='col'" +
                (5 <= (g + s + 6) % 7
                  ? " class='ui-datepicker-week-end'"
                  : "") +
                "><span title='" +
                r[(P = (g + s) % 7)] +
                "'>" +
                a[P] +
                "</span></th>";
            for (
              w += x + "</tr></thead><tbody>",
                k = this._getDaysInMonth(V, U),
                V === e.selectedYear &&
                  U === e.selectedMonth &&
                  (e.selectedDay = Math.min(e.selectedDay, k)),
                C = (this._getFirstDayOfMonth(V, U) - s + 7) % 7,
                k = Math.ceil((C + k) / 7),
                T = $ && this.maxRows > k ? this.maxRows : k,
                this.maxRows = T,
                H = this._daylightSavingAdjust(new Date(V, U, 1 - C)),
                D = 0;
              D < T;
              D++
            ) {
              for (
                w += "<tr>",
                  I = o
                    ? "<td class='ui-datepicker-week-col'>" +
                      this._get(e, "calculateWeek")(H) +
                      "</td>"
                    : "",
                  g = 0;
                g < 7;
                g++
              )
                ((S = c ? c.apply(e.input ? e.input[0] : null, [H]) : [!0, ""]),
                  (A =
                    ((E = H.getMonth() !== U) && !d) ||
                    !S[0] ||
                    (W && H < W) ||
                    (B && B < H)),
                  (I +=
                    "<td class='" +
                    (5 <= (g + s + 6) % 7 ? " ui-datepicker-week-end" : "") +
                    (E ? " ui-datepicker-other-month" : "") +
                    ((H.getTime() === y.getTime() &&
                      U === e.selectedMonth &&
                      e._keyEvent) ||
                    (p.getTime() === H.getTime() && p.getTime() === y.getTime())
                      ? " " + this._dayOverClass
                      : "") +
                    (A
                      ? " " + this._unselectableClass + " ui-state-disabled"
                      : "") +
                    (E && !u
                      ? ""
                      : " " +
                        S[1] +
                        (H.getTime() === q.getTime()
                          ? " " + this._currentClass
                          : "") +
                        (H.getTime() === O.getTime()
                          ? " ui-datepicker-today"
                          : "")) +
                    "'" +
                    ((E && !u) || !S[2]
                      ? ""
                      : " title='" + S[2].replace(/'/g, "&#39;") + "'") +
                    (A
                      ? ""
                      : " data-handler='selectDay' data-event='click' data-month='" +
                        H.getMonth() +
                        "' data-year='" +
                        H.getFullYear() +
                        "'") +
                    ">" +
                    (E && !u
                      ? "&#xa0;"
                      : A
                        ? "<span class='ui-state-default'>" +
                          H.getDate() +
                          "</span>"
                        : "<a class='ui-state-default" +
                          (H.getTime() === O.getTime()
                            ? " ui-state-highlight"
                            : "") +
                          (H.getTime() === q.getTime()
                            ? " ui-state-active"
                            : "") +
                          (E ? " ui-priority-secondary" : "") +
                          "' href='#' aria-current='" +
                          (H.getTime() === q.getTime() ? "true" : "false") +
                          "' data-date='" +
                          H.getDate() +
                          "'>" +
                          H.getDate() +
                          "</a>") +
                    "</td>"),
                  H.setDate(H.getDate() + 1),
                  (H = this._daylightSavingAdjust(H)));
              w += I + "</tr>";
            }
            (11 < ++U && ((U = 0), V++),
              (v += w +=
                "</tbody></table>" +
                ($
                  ? "</div>" +
                    (0 < F[0] && b === F[1] - 1
                      ? "<div class='ui-datepicker-row-break'></div>"
                      : "")
                  : "")));
          }
          f += v;
        }
        return ((f += j), (e._keyEvent = !1), f);
      },
      _generateMonthYearHeader: function (e, t, i, n, s, o, r, a) {
        var l,
          h,
          c,
          u,
          d,
          p,
          f = this._get(e, "changeMonth"),
          g = this._get(e, "changeYear"),
          m = this._get(e, "showMonthAfterYear"),
          v = this._get(e, "selectMonthLabel"),
          b = this._get(e, "selectYearLabel"),
          y = "<div class='ui-datepicker-title'>",
          _ = "";
        if (o || !f)
          _ += "<span class='ui-datepicker-month'>" + r[t] + "</span>";
        else {
          for (
            l = n && n.getFullYear() === i,
              h = s && s.getFullYear() === i,
              _ +=
                "<select class='ui-datepicker-month' aria-label='" +
                v +
                "' data-handler='selectMonth' data-event='change'>",
              c = 0;
            c < 12;
            c++
          )
            (!l || c >= n.getMonth()) &&
              (!h || c <= s.getMonth()) &&
              (_ +=
                "<option value='" +
                c +
                "'" +
                (c === t ? " selected='selected'" : "") +
                ">" +
                a[c] +
                "</option>");
          _ += "</select>";
        }
        if ((m || (y += _ + (!o && f && g ? "" : "&#xa0;")), !e.yearshtml))
          if (((e.yearshtml = ""), o || !g))
            y += "<span class='ui-datepicker-year'>" + i + "</span>";
          else {
            for (
              r = this._get(e, "yearRange").split(":"),
                u = new Date().getFullYear(),
                d = (v = function (e) {
                  e = e.match(/c[+\-].*/)
                    ? i + parseInt(e.substring(1), 10)
                    : e.match(/[+\-].*/)
                      ? u + parseInt(e, 10)
                      : parseInt(e, 10);
                  return isNaN(e) ? u : e;
                })(r[0]),
                p = Math.max(d, v(r[1] || "")),
                d = n ? Math.max(d, n.getFullYear()) : d,
                p = s ? Math.min(p, s.getFullYear()) : p,
                e.yearshtml +=
                  "<select class='ui-datepicker-year' aria-label='" +
                  b +
                  "' data-handler='selectYear' data-event='change'>";
              d <= p;
              d++
            )
              e.yearshtml +=
                "<option value='" +
                d +
                "'" +
                (d === i ? " selected='selected'" : "") +
                ">" +
                d +
                "</option>";
            ((e.yearshtml += "</select>"),
              (y += e.yearshtml),
              (e.yearshtml = null));
          }
        return (
          (y += this._get(e, "yearSuffix")),
          m && (y += (!o && f && g ? "" : "&#xa0;") + _),
          (y += "</div>")
        );
      },
      _adjustInstDate: function (e, t, i) {
        var n = e.selectedYear + ("Y" === i ? t : 0),
          s = e.selectedMonth + ("M" === i ? t : 0),
          t =
            Math.min(e.selectedDay, this._getDaysInMonth(n, s)) +
            ("D" === i ? t : 0),
          t = this._restrictMinMax(
            e,
            this._daylightSavingAdjust(new Date(n, s, t)),
          );
        ((e.selectedDay = t.getDate()),
          (e.drawMonth = e.selectedMonth = t.getMonth()),
          (e.drawYear = e.selectedYear = t.getFullYear()),
          ("M" !== i && "Y" !== i) || this._notifyChange(e));
      },
      _restrictMinMax: function (e, t) {
        var i = this._getMinMaxDate(e, "min"),
          e = this._getMinMaxDate(e, "max"),
          t = i && t < i ? i : t;
        return e && e < t ? e : t;
      },
      _notifyChange: function (e) {
        var t = this._get(e, "onChangeMonthYear");
        t &&
          t.apply(e.input ? e.input[0] : null, [
            e.selectedYear,
            e.selectedMonth + 1,
            e,
          ]);
      },
      _getNumberOfMonths: function (e) {
        e = this._get(e, "numberOfMonths");
        return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e;
      },
      _getMinMaxDate: function (e, t) {
        return this._determineDate(e, this._get(e, t + "Date"), null);
      },
      _getDaysInMonth: function (e, t) {
        return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate();
      },
      _getFirstDayOfMonth: function (e, t) {
        return new Date(e, t, 1).getDay();
      },
      _canAdjustMonth: function (e, t, i, n) {
        var s = this._getNumberOfMonths(e),
          s = this._daylightSavingAdjust(
            new Date(i, n + (t < 0 ? t : s[0] * s[1]), 1),
          );
        return (
          t < 0 &&
            s.setDate(this._getDaysInMonth(s.getFullYear(), s.getMonth())),
          this._isInRange(e, s)
        );
      },
      _isInRange: function (e, t) {
        var i = this._getMinMaxDate(e, "min"),
          n = this._getMinMaxDate(e, "max"),
          s = null,
          o = null,
          r = this._get(e, "yearRange");
        return (
          r &&
            ((e = r.split(":")),
            (r = new Date().getFullYear()),
            (s = parseInt(e[0], 10)),
            (o = parseInt(e[1], 10)),
            e[0].match(/[+\-].*/) && (s += r),
            e[1].match(/[+\-].*/) && (o += r)),
          (!i || t.getTime() >= i.getTime()) &&
            (!n || t.getTime() <= n.getTime()) &&
            (!s || t.getFullYear() >= s) &&
            (!o || t.getFullYear() <= o)
        );
      },
      _getFormatConfig: function (e) {
        var t = this._get(e, "shortYearCutoff");
        return {
          shortYearCutoff: (t =
            "string" != typeof t
              ? t
              : (new Date().getFullYear() % 100) + parseInt(t, 10)),
          dayNamesShort: this._get(e, "dayNamesShort"),
          dayNames: this._get(e, "dayNames"),
          monthNamesShort: this._get(e, "monthNamesShort"),
          monthNames: this._get(e, "monthNames"),
        };
      },
      _formatDate: function (e, t, i, n) {
        t ||
          ((e.currentDay = e.selectedDay),
          (e.currentMonth = e.selectedMonth),
          (e.currentYear = e.selectedYear));
        t = t
          ? "object" == typeof t
            ? t
            : this._daylightSavingAdjust(new Date(n, i, t))
          : this._daylightSavingAdjust(
              new Date(e.currentYear, e.currentMonth, e.currentDay),
            );
        return this.formatDate(
          this._get(e, "dateFormat"),
          t,
          this._getFormatConfig(e),
        );
      },
    }),
    (Y.fn.datepicker = function (e) {
      if (!this.length) return this;
      (Y.datepicker.initialized ||
        (Y(document).on("mousedown", Y.datepicker._checkExternalClick),
        (Y.datepicker.initialized = !0)),
        0 === Y("#" + Y.datepicker._mainDivId).length &&
          Y("body").append(Y.datepicker.dpDiv));
      var t = Array.prototype.slice.call(arguments, 1);
      return ("string" == typeof e &&
        ("isDisabled" === e || "getDate" === e || "widget" === e)) ||
        ("option" === e &&
          2 === arguments.length &&
          "string" == typeof arguments[1])
        ? Y.datepicker["_" + e + "Datepicker"].apply(
            Y.datepicker,
            [this[0]].concat(t),
          )
        : this.each(function () {
            "string" == typeof e
              ? Y.datepicker["_" + e + "Datepicker"].apply(
                  Y.datepicker,
                  [this].concat(t),
                )
              : Y.datepicker._attachDatepicker(this, e);
          });
    }),
    (Y.datepicker = new ne()),
    (Y.datepicker.initialized = !1),
    (Y.datepicker.uuid = new Date().getTime()),
    (Y.datepicker.version = "1.13.0"));
  (Y.datepicker,
    (Y.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())));
  var ae = !1;
  Y(document).on("mouseup", function () {
    ae = !1;
  });
  (Y.widget("ui.mouse", {
    version: "1.13.0",
    options: {
      cancel: "input, textarea, button, select, option",
      distance: 1,
      delay: 0,
    },
    _mouseInit: function () {
      var t = this;
      (this.element
        .on("mousedown." + this.widgetName, function (e) {
          return t._mouseDown(e);
        })
        .on("click." + this.widgetName, function (e) {
          if (!0 === Y.data(e.target, t.widgetName + ".preventClickEvent"))
            return (
              Y.removeData(e.target, t.widgetName + ".preventClickEvent"),
              e.stopImmediatePropagation(),
              !1
            );
        }),
        (this.started = !1));
    },
    _mouseDestroy: function () {
      (this.element.off("." + this.widgetName),
        this._mouseMoveDelegate &&
          this.document
            .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
            .off("mouseup." + this.widgetName, this._mouseUpDelegate));
    },
    _mouseDown: function (e) {
      if (!ae) {
        ((this._mouseMoved = !1),
          this._mouseStarted && this._mouseUp(e),
          (this._mouseDownEvent = e));
        var t = this,
          i = 1 === e.which,
          n =
            !("string" != typeof this.options.cancel || !e.target.nodeName) &&
            Y(e.target).closest(this.options.cancel).length;
        return i && !n && this._mouseCapture(e)
          ? ((this.mouseDelayMet = !this.options.delay),
            this.mouseDelayMet ||
              (this._mouseDelayTimer = setTimeout(function () {
                t.mouseDelayMet = !0;
              }, this.options.delay)),
            this._mouseDistanceMet(e) &&
            this._mouseDelayMet(e) &&
            ((this._mouseStarted = !1 !== this._mouseStart(e)),
            !this._mouseStarted)
              ? (e.preventDefault(), !0)
              : (!0 ===
                  Y.data(e.target, this.widgetName + ".preventClickEvent") &&
                  Y.removeData(
                    e.target,
                    this.widgetName + ".preventClickEvent",
                  ),
                (this._mouseMoveDelegate = function (e) {
                  return t._mouseMove(e);
                }),
                (this._mouseUpDelegate = function (e) {
                  return t._mouseUp(e);
                }),
                this.document
                  .on("mousemove." + this.widgetName, this._mouseMoveDelegate)
                  .on("mouseup." + this.widgetName, this._mouseUpDelegate),
                "slider" === this.widgetName && e.preventDefault(),
                (ae = !0)))
          : !0;
      }
    },
    _mouseMove: function (e) {
      if (this._mouseMoved) {
        if (
          Y.ui.ie &&
          (!document.documentMode || document.documentMode < 9) &&
          !e.button
        )
          return this._mouseUp(e);
        if (!e.which)
          if (
            e.originalEvent.altKey ||
            e.originalEvent.ctrlKey ||
            e.originalEvent.metaKey ||
            e.originalEvent.shiftKey
          )
            this.ignoreMissingWhich = !0;
          else if (!this.ignoreMissingWhich) return this._mouseUp(e);
      }
      return (
        (e.which || e.button) && (this._mouseMoved = !0),
        this._mouseStarted
          ? (this._mouseDrag(e), e.preventDefault())
          : (this._mouseDistanceMet(e) &&
              this._mouseDelayMet(e) &&
              ((this._mouseStarted =
                !1 !== this._mouseStart(this._mouseDownEvent, e)),
              this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)),
            !this._mouseStarted)
      );
    },
    _mouseUp: function (e) {
      (this.document
        .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
        .off("mouseup." + this.widgetName, this._mouseUpDelegate),
        this._mouseStarted &&
          ((this._mouseStarted = !1),
          e.target === this._mouseDownEvent.target &&
            Y.data(e.target, this.widgetName + ".preventClickEvent", !0),
          this._mouseStop(e)),
        this._mouseDelayTimer &&
          (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer),
        (this.ignoreMissingWhich = !1),
        (ae = !1),
        e.preventDefault());
    },
    _mouseDistanceMet: function (e) {
      return (
        Math.max(
          Math.abs(this._mouseDownEvent.pageX - e.pageX),
          Math.abs(this._mouseDownEvent.pageY - e.pageY),
        ) >= this.options.distance
      );
    },
    _mouseDelayMet: function () {
      return this.mouseDelayMet;
    },
    _mouseStart: function () {},
    _mouseDrag: function () {},
    _mouseStop: function () {},
    _mouseCapture: function () {
      return !0;
    },
  }),
    (Y.ui.plugin = {
      add: function (e, t, i) {
        var n,
          s = Y.ui[e].prototype;
        for (n in i)
          ((s.plugins[n] = s.plugins[n] || []), s.plugins[n].push([t, i[n]]));
      },
      call: function (e, t, i, n) {
        var s,
          o = e.plugins[t];
        if (
          o &&
          (n ||
            (e.element[0].parentNode &&
              11 !== e.element[0].parentNode.nodeType))
        )
          for (s = 0; s < o.length; s++)
            e.options[o[s][0]] && o[s][1].apply(e.element, i);
      },
    }),
    (Y.ui.safeBlur = function (e) {
      e && "body" !== e.nodeName.toLowerCase() && Y(e).trigger("blur");
    }));
  (Y.widget("ui.draggable", Y.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "drag",
    options: {
      addClasses: !0,
      appendTo: "parent",
      axis: !1,
      connectToSortable: !1,
      containment: !1,
      cursor: "auto",
      cursorAt: !1,
      grid: !1,
      handle: !1,
      helper: "original",
      iframeFix: !1,
      opacity: !1,
      refreshPositions: !1,
      revert: !1,
      revertDuration: 500,
      scope: "default",
      scroll: !0,
      scrollSensitivity: 20,
      scrollSpeed: 20,
      snap: !1,
      snapMode: "both",
      snapTolerance: 20,
      stack: !1,
      zIndex: !1,
      drag: null,
      start: null,
      stop: null,
    },
    _create: function () {
      ("original" === this.options.helper && this._setPositionRelative(),
        this.options.addClasses && this._addClass("ui-draggable"),
        this._setHandleClassName(),
        this._mouseInit());
    },
    _setOption: function (e, t) {
      (this._super(e, t),
        "handle" === e &&
          (this._removeHandleClassName(), this._setHandleClassName()));
    },
    _destroy: function () {
      (this.helper || this.element).is(".ui-draggable-dragging")
        ? (this.destroyOnClear = !0)
        : (this._removeHandleClassName(), this._mouseDestroy());
    },
    _mouseCapture: function (e) {
      var t = this.options;
      return (
        !(
          this.helper ||
          t.disabled ||
          0 < Y(e.target).closest(".ui-resizable-handle").length
        ) &&
        ((this.handle = this._getHandle(e)),
        !!this.handle &&
          (this._blurActiveElement(e),
          this._blockFrames(!0 === t.iframeFix ? "iframe" : t.iframeFix),
          !0))
      );
    },
    _blockFrames: function (e) {
      this.iframeBlocks = this.document.find(e).map(function () {
        var e = Y(this);
        return Y("<div>")
          .css("position", "absolute")
          .appendTo(e.parent())
          .outerWidth(e.outerWidth())
          .outerHeight(e.outerHeight())
          .offset(e.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _blurActiveElement: function (e) {
      var t = Y.ui.safeActiveElement(this.document[0]);
      Y(e.target).closest(t).length || Y.ui.safeBlur(t);
    },
    _mouseStart: function (e) {
      var t = this.options;
      return (
        (this.helper = this._createHelper(e)),
        this._addClass(this.helper, "ui-draggable-dragging"),
        this._cacheHelperProportions(),
        Y.ui.ddmanager && (Y.ui.ddmanager.current = this),
        this._cacheMargins(),
        (this.cssPosition = this.helper.css("position")),
        (this.scrollParent = this.helper.scrollParent(!0)),
        (this.offsetParent = this.helper.offsetParent()),
        (this.hasFixedAncestor =
          0 <
          this.helper.parents().filter(function () {
            return "fixed" === Y(this).css("position");
          }).length),
        (this.positionAbs = this.element.offset()),
        this._refreshOffsets(e),
        (this.originalPosition = this.position = this._generatePosition(e, !1)),
        (this.originalPageX = e.pageX),
        (this.originalPageY = e.pageY),
        t.cursorAt && this._adjustOffsetFromHelper(t.cursorAt),
        this._setContainment(),
        !1 === this._trigger("start", e)
          ? (this._clear(), !1)
          : (this._cacheHelperProportions(),
            Y.ui.ddmanager &&
              !t.dropBehaviour &&
              Y.ui.ddmanager.prepareOffsets(this, e),
            this._mouseDrag(e, !0),
            Y.ui.ddmanager && Y.ui.ddmanager.dragStart(this, e),
            !0)
      );
    },
    _refreshOffsets: function (e) {
      ((this.offset = {
        top: this.positionAbs.top - this.margins.top,
        left: this.positionAbs.left - this.margins.left,
        scroll: !1,
        parent: this._getParentOffset(),
        relative: this._getRelativeOffset(),
      }),
        (this.offset.click = {
          left: e.pageX - this.offset.left,
          top: e.pageY - this.offset.top,
        }));
    },
    _mouseDrag: function (e, t) {
      if (
        (this.hasFixedAncestor &&
          (this.offset.parent = this._getParentOffset()),
        (this.position = this._generatePosition(e, !0)),
        (this.positionAbs = this._convertPositionTo("absolute")),
        !t)
      ) {
        t = this._uiHash();
        if (!1 === this._trigger("drag", e, t))
          return (this._mouseUp(new Y.Event("mouseup", e)), !1);
        this.position = t.position;
      }
      return (
        (this.helper[0].style.left = this.position.left + "px"),
        (this.helper[0].style.top = this.position.top + "px"),
        Y.ui.ddmanager && Y.ui.ddmanager.drag(this, e),
        !1
      );
    },
    _mouseStop: function (e) {
      var t = this,
        i = !1;
      return (
        Y.ui.ddmanager &&
          !this.options.dropBehaviour &&
          (i = Y.ui.ddmanager.drop(this, e)),
        this.dropped && ((i = this.dropped), (this.dropped = !1)),
        ("invalid" === this.options.revert && !i) ||
        ("valid" === this.options.revert && i) ||
        !0 === this.options.revert ||
        ("function" == typeof this.options.revert &&
          this.options.revert.call(this.element, i))
          ? Y(this.helper).animate(
              this.originalPosition,
              parseInt(this.options.revertDuration, 10),
              function () {
                !1 !== t._trigger("stop", e) && t._clear();
              },
            )
          : !1 !== this._trigger("stop", e) && this._clear(),
        !1
      );
    },
    _mouseUp: function (e) {
      return (
        this._unblockFrames(),
        Y.ui.ddmanager && Y.ui.ddmanager.dragStop(this, e),
        this.handleElement.is(e.target) && this.element.trigger("focus"),
        Y.ui.mouse.prototype._mouseUp.call(this, e)
      );
    },
    cancel: function () {
      return (
        this.helper.is(".ui-draggable-dragging")
          ? this._mouseUp(new Y.Event("mouseup", { target: this.element[0] }))
          : this._clear(),
        this
      );
    },
    _getHandle: function (e) {
      return (
        !this.options.handle ||
        !!Y(e.target).closest(this.element.find(this.options.handle)).length
      );
    },
    _setHandleClassName: function () {
      ((this.handleElement = this.options.handle
        ? this.element.find(this.options.handle)
        : this.element),
        this._addClass(this.handleElement, "ui-draggable-handle"));
    },
    _removeHandleClassName: function () {
      this._removeClass(this.handleElement, "ui-draggable-handle");
    },
    _createHelper: function (e) {
      var t = this.options,
        i = "function" == typeof t.helper,
        e = i
          ? Y(t.helper.apply(this.element[0], [e]))
          : "clone" === t.helper
            ? this.element.clone().removeAttr("id")
            : this.element;
      return (
        e.parents("body").length ||
          e.appendTo(
            "parent" === t.appendTo ? this.element[0].parentNode : t.appendTo,
          ),
        i && e[0] === this.element[0] && this._setPositionRelative(),
        e[0] === this.element[0] ||
          /(fixed|absolute)/.test(e.css("position")) ||
          e.css("position", "absolute"),
        e
      );
    },
    _setPositionRelative: function () {
      /^(?:r|a|f)/.test(this.element.css("position")) ||
        (this.element[0].style.position = "relative");
    },
    _adjustOffsetFromHelper: function (e) {
      ("string" == typeof e && (e = e.split(" ")),
        "left" in
          (e = Array.isArray(e) ? { left: +e[0], top: +e[1] || 0 } : e) &&
          (this.offset.click.left = e.left + this.margins.left),
        "right" in e &&
          (this.offset.click.left =
            this.helperProportions.width - e.right + this.margins.left),
        "top" in e && (this.offset.click.top = e.top + this.margins.top),
        "bottom" in e &&
          (this.offset.click.top =
            this.helperProportions.height - e.bottom + this.margins.top));
    },
    _isRootNode: function (e) {
      return /(html|body)/i.test(e.tagName) || e === this.document[0];
    },
    _getParentOffset: function () {
      var e = this.offsetParent.offset(),
        t = this.document[0];
      return (
        "absolute" === this.cssPosition &&
          this.scrollParent[0] !== t &&
          Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
          ((e.left += this.scrollParent.scrollLeft()),
          (e.top += this.scrollParent.scrollTop())),
        {
          top:
            (e = this._isRootNode(this.offsetParent[0])
              ? { top: 0, left: 0 }
              : e).top +
            (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
          left:
            e.left +
            (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
        }
      );
    },
    _getRelativeOffset: function () {
      if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
      var e = this.element.position(),
        t = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          e.top -
          (parseInt(this.helper.css("top"), 10) || 0) +
          (t ? 0 : this.scrollParent.scrollTop()),
        left:
          e.left -
          (parseInt(this.helper.css("left"), 10) || 0) +
          (t ? 0 : this.scrollParent.scrollLeft()),
      };
    },
    _cacheMargins: function () {
      this.margins = {
        left: parseInt(this.element.css("marginLeft"), 10) || 0,
        top: parseInt(this.element.css("marginTop"), 10) || 0,
        right: parseInt(this.element.css("marginRight"), 10) || 0,
        bottom: parseInt(this.element.css("marginBottom"), 10) || 0,
      };
    },
    _cacheHelperProportions: function () {
      this.helperProportions = {
        width: this.helper.outerWidth(),
        height: this.helper.outerHeight(),
      };
    },
    _setContainment: function () {
      var e,
        t,
        i,
        n = this.options,
        s = this.document[0];
      ((this.relativeContainer = null),
        n.containment
          ? "window" !== n.containment
            ? "document" !== n.containment
              ? n.containment.constructor !== Array
                ? ("parent" === n.containment &&
                    (n.containment = this.helper[0].parentNode),
                  (i = (t = Y(n.containment))[0]) &&
                    ((e = /(scroll|auto)/.test(t.css("overflow"))),
                    (this.containment = [
                      (parseInt(t.css("borderLeftWidth"), 10) || 0) +
                        (parseInt(t.css("paddingLeft"), 10) || 0),
                      (parseInt(t.css("borderTopWidth"), 10) || 0) +
                        (parseInt(t.css("paddingTop"), 10) || 0),
                      (e
                        ? Math.max(i.scrollWidth, i.offsetWidth)
                        : i.offsetWidth) -
                        (parseInt(t.css("borderRightWidth"), 10) || 0) -
                        (parseInt(t.css("paddingRight"), 10) || 0) -
                        this.helperProportions.width -
                        this.margins.left -
                        this.margins.right,
                      (e
                        ? Math.max(i.scrollHeight, i.offsetHeight)
                        : i.offsetHeight) -
                        (parseInt(t.css("borderBottomWidth"), 10) || 0) -
                        (parseInt(t.css("paddingBottom"), 10) || 0) -
                        this.helperProportions.height -
                        this.margins.top -
                        this.margins.bottom,
                    ]),
                    (this.relativeContainer = t)))
                : (this.containment = n.containment)
              : (this.containment = [
                  0,
                  0,
                  Y(s).width() -
                    this.helperProportions.width -
                    this.margins.left,
                  (Y(s).height() || s.body.parentNode.scrollHeight) -
                    this.helperProportions.height -
                    this.margins.top,
                ])
            : (this.containment = [
                Y(window).scrollLeft() -
                  this.offset.relative.left -
                  this.offset.parent.left,
                Y(window).scrollTop() -
                  this.offset.relative.top -
                  this.offset.parent.top,
                Y(window).scrollLeft() +
                  Y(window).width() -
                  this.helperProportions.width -
                  this.margins.left,
                Y(window).scrollTop() +
                  (Y(window).height() || s.body.parentNode.scrollHeight) -
                  this.helperProportions.height -
                  this.margins.top,
              ])
          : (this.containment = null));
    },
    _convertPositionTo: function (e, t) {
      t = t || this.position;
      var i = "absolute" === e ? 1 : -1,
        e = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          t.top +
          this.offset.relative.top * i +
          this.offset.parent.top * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.top
            : e
              ? 0
              : this.offset.scroll.top) *
            i,
        left:
          t.left +
          this.offset.relative.left * i +
          this.offset.parent.left * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.left
            : e
              ? 0
              : this.offset.scroll.left) *
            i,
      };
    },
    _generatePosition: function (e, t) {
      var i,
        n = this.options,
        s = this._isRootNode(this.scrollParent[0]),
        o = e.pageX,
        r = e.pageY;
      return (
        (s && this.offset.scroll) ||
          (this.offset.scroll = {
            top: this.scrollParent.scrollTop(),
            left: this.scrollParent.scrollLeft(),
          }),
        t &&
          (this.containment &&
            ((i = this.relativeContainer
              ? ((i = this.relativeContainer.offset()),
                [
                  this.containment[0] + i.left,
                  this.containment[1] + i.top,
                  this.containment[2] + i.left,
                  this.containment[3] + i.top,
                ])
              : this.containment),
            e.pageX - this.offset.click.left < i[0] &&
              (o = i[0] + this.offset.click.left),
            e.pageY - this.offset.click.top < i[1] &&
              (r = i[1] + this.offset.click.top),
            e.pageX - this.offset.click.left > i[2] &&
              (o = i[2] + this.offset.click.left),
            e.pageY - this.offset.click.top > i[3] &&
              (r = i[3] + this.offset.click.top)),
          n.grid &&
            ((e = n.grid[1]
              ? this.originalPageY +
                Math.round((r - this.originalPageY) / n.grid[1]) * n.grid[1]
              : this.originalPageY),
            (r =
              !i ||
              e - this.offset.click.top >= i[1] ||
              e - this.offset.click.top > i[3]
                ? e
                : e - this.offset.click.top >= i[1]
                  ? e - n.grid[1]
                  : e + n.grid[1]),
            (e = n.grid[0]
              ? this.originalPageX +
                Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0]
              : this.originalPageX),
            (o =
              !i ||
              e - this.offset.click.left >= i[0] ||
              e - this.offset.click.left > i[2]
                ? e
                : e - this.offset.click.left >= i[0]
                  ? e - n.grid[0]
                  : e + n.grid[0])),
          "y" === n.axis && (o = this.originalPageX),
          "x" === n.axis && (r = this.originalPageY)),
        {
          top:
            r -
            this.offset.click.top -
            this.offset.relative.top -
            this.offset.parent.top +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.top
              : s
                ? 0
                : this.offset.scroll.top),
          left:
            o -
            this.offset.click.left -
            this.offset.relative.left -
            this.offset.parent.left +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.left
              : s
                ? 0
                : this.offset.scroll.left),
        }
      );
    },
    _clear: function () {
      (this._removeClass(this.helper, "ui-draggable-dragging"),
        this.helper[0] === this.element[0] ||
          this.cancelHelperRemoval ||
          this.helper.remove(),
        (this.helper = null),
        (this.cancelHelperRemoval = !1),
        this.destroyOnClear && this.destroy());
    },
    _trigger: function (e, t, i) {
      return (
        (i = i || this._uiHash()),
        Y.ui.plugin.call(this, e, [t, i, this], !0),
        /^(drag|start|stop)/.test(e) &&
          ((this.positionAbs = this._convertPositionTo("absolute")),
          (i.offset = this.positionAbs)),
        Y.Widget.prototype._trigger.call(this, e, t, i)
      );
    },
    plugins: {},
    _uiHash: function () {
      return {
        helper: this.helper,
        position: this.position,
        originalPosition: this.originalPosition,
        offset: this.positionAbs,
      };
    },
  }),
    Y.ui.plugin.add("draggable", "connectToSortable", {
      start: function (t, e, i) {
        var n = Y.extend({}, e, { item: i.element });
        ((i.sortables = []),
          Y(i.options.connectToSortable).each(function () {
            var e = Y(this).sortable("instance");
            e &&
              !e.options.disabled &&
              (i.sortables.push(e),
              e.refreshPositions(),
              e._trigger("activate", t, n));
          }));
      },
      stop: function (t, e, i) {
        var n = Y.extend({}, e, { item: i.element });
        ((i.cancelHelperRemoval = !1),
          Y.each(i.sortables, function () {
            var e = this;
            e.isOver
              ? ((e.isOver = 0),
                (i.cancelHelperRemoval = !0),
                (e.cancelHelperRemoval = !1),
                (e._storedCSS = {
                  position: e.placeholder.css("position"),
                  top: e.placeholder.css("top"),
                  left: e.placeholder.css("left"),
                }),
                e._mouseStop(t),
                (e.options.helper = e.options._helper))
              : ((e.cancelHelperRemoval = !0), e._trigger("deactivate", t, n));
          }));
      },
      drag: function (i, n, s) {
        Y.each(s.sortables, function () {
          var e = !1,
            t = this;
          ((t.positionAbs = s.positionAbs),
            (t.helperProportions = s.helperProportions),
            (t.offset.click = s.offset.click),
            t._intersectsWith(t.containerCache) &&
              ((e = !0),
              Y.each(s.sortables, function () {
                return (
                  (this.positionAbs = s.positionAbs),
                  (this.helperProportions = s.helperProportions),
                  (this.offset.click = s.offset.click),
                  (e =
                    this !== t &&
                    this._intersectsWith(this.containerCache) &&
                    Y.contains(t.element[0], this.element[0])
                      ? !1
                      : e)
                );
              })),
            e
              ? (t.isOver ||
                  ((t.isOver = 1),
                  (s._parent = n.helper.parent()),
                  (t.currentItem = n.helper
                    .appendTo(t.element)
                    .data("ui-sortable-item", !0)),
                  (t.options._helper = t.options.helper),
                  (t.options.helper = function () {
                    return n.helper[0];
                  }),
                  (i.target = t.currentItem[0]),
                  t._mouseCapture(i, !0),
                  t._mouseStart(i, !0, !0),
                  (t.offset.click.top = s.offset.click.top),
                  (t.offset.click.left = s.offset.click.left),
                  (t.offset.parent.left -=
                    s.offset.parent.left - t.offset.parent.left),
                  (t.offset.parent.top -=
                    s.offset.parent.top - t.offset.parent.top),
                  s._trigger("toSortable", i),
                  (s.dropped = t.element),
                  Y.each(s.sortables, function () {
                    this.refreshPositions();
                  }),
                  (s.currentItem = s.element),
                  (t.fromOutside = s)),
                t.currentItem && (t._mouseDrag(i), (n.position = t.position)))
              : t.isOver &&
                ((t.isOver = 0),
                (t.cancelHelperRemoval = !0),
                (t.options._revert = t.options.revert),
                (t.options.revert = !1),
                t._trigger("out", i, t._uiHash(t)),
                t._mouseStop(i, !0),
                (t.options.revert = t.options._revert),
                (t.options.helper = t.options._helper),
                t.placeholder && t.placeholder.remove(),
                n.helper.appendTo(s._parent),
                s._refreshOffsets(i),
                (n.position = s._generatePosition(i, !0)),
                s._trigger("fromSortable", i),
                (s.dropped = !1),
                Y.each(s.sortables, function () {
                  this.refreshPositions();
                })));
        });
      },
    }),
    Y.ui.plugin.add("draggable", "cursor", {
      start: function (e, t, i) {
        var n = Y("body"),
          i = i.options;
        (n.css("cursor") && (i._cursor = n.css("cursor")),
          n.css("cursor", i.cursor));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._cursor && Y("body").css("cursor", i._cursor);
      },
    }),
    Y.ui.plugin.add("draggable", "opacity", {
      start: function (e, t, i) {
        ((t = Y(t.helper)), (i = i.options));
        (t.css("opacity") && (i._opacity = t.css("opacity")),
          t.css("opacity", i.opacity));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._opacity && Y(t.helper).css("opacity", i._opacity);
      },
    }),
    Y.ui.plugin.add("draggable", "scroll", {
      start: function (e, t, i) {
        (i.scrollParentNotHidden ||
          (i.scrollParentNotHidden = i.helper.scrollParent(!1)),
          i.scrollParentNotHidden[0] !== i.document[0] &&
            "HTML" !== i.scrollParentNotHidden[0].tagName &&
            (i.overflowOffset = i.scrollParentNotHidden.offset()));
      },
      drag: function (e, t, i) {
        var n = i.options,
          s = !1,
          o = i.scrollParentNotHidden[0],
          r = i.document[0];
        (o !== r && "HTML" !== o.tagName
          ? ((n.axis && "x" === n.axis) ||
              (i.overflowOffset.top + o.offsetHeight - e.pageY <
              n.scrollSensitivity
                ? (o.scrollTop = s = o.scrollTop + n.scrollSpeed)
                : e.pageY - i.overflowOffset.top < n.scrollSensitivity &&
                  (o.scrollTop = s = o.scrollTop - n.scrollSpeed)),
            (n.axis && "y" === n.axis) ||
              (i.overflowOffset.left + o.offsetWidth - e.pageX <
              n.scrollSensitivity
                ? (o.scrollLeft = s = o.scrollLeft + n.scrollSpeed)
                : e.pageX - i.overflowOffset.left < n.scrollSensitivity &&
                  (o.scrollLeft = s = o.scrollLeft - n.scrollSpeed)))
          : ((n.axis && "x" === n.axis) ||
              (e.pageY - Y(r).scrollTop() < n.scrollSensitivity
                ? (s = Y(r).scrollTop(Y(r).scrollTop() - n.scrollSpeed))
                : Y(window).height() - (e.pageY - Y(r).scrollTop()) <
                    n.scrollSensitivity &&
                  (s = Y(r).scrollTop(Y(r).scrollTop() + n.scrollSpeed))),
            (n.axis && "y" === n.axis) ||
              (e.pageX - Y(r).scrollLeft() < n.scrollSensitivity
                ? (s = Y(r).scrollLeft(Y(r).scrollLeft() - n.scrollSpeed))
                : Y(window).width() - (e.pageX - Y(r).scrollLeft()) <
                    n.scrollSensitivity &&
                  (s = Y(r).scrollLeft(Y(r).scrollLeft() + n.scrollSpeed)))),
          !1 !== s &&
            Y.ui.ddmanager &&
            !n.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(i, e));
      },
    }),
    Y.ui.plugin.add("draggable", "snap", {
      start: function (e, t, i) {
        var n = i.options;
        ((i.snapElements = []),
          Y(
            n.snap.constructor !== String
              ? n.snap.items || ":data(ui-draggable)"
              : n.snap,
          ).each(function () {
            var e = Y(this),
              t = e.offset();
            this !== i.element[0] &&
              i.snapElements.push({
                item: this,
                width: e.outerWidth(),
                height: e.outerHeight(),
                top: t.top,
                left: t.left,
              });
          }));
      },
      drag: function (e, t, i) {
        for (
          var n,
            s,
            o,
            r,
            a,
            l,
            h,
            c,
            u,
            d = i.options,
            p = d.snapTolerance,
            f = t.offset.left,
            g = f + i.helperProportions.width,
            m = t.offset.top,
            v = m + i.helperProportions.height,
            b = i.snapElements.length - 1;
          0 <= b;
          b--
        )
          ((l =
            (a = i.snapElements[b].left - i.margins.left) +
            i.snapElements[b].width),
            (c =
              (h = i.snapElements[b].top - i.margins.top) +
              i.snapElements[b].height),
            g < a - p ||
            l + p < f ||
            v < h - p ||
            c + p < m ||
            !Y.contains(
              i.snapElements[b].item.ownerDocument,
              i.snapElements[b].item,
            )
              ? (i.snapElements[b].snapping &&
                  i.options.snap.release &&
                  i.options.snap.release.call(
                    i.element,
                    e,
                    Y.extend(i._uiHash(), { snapItem: i.snapElements[b].item }),
                  ),
                (i.snapElements[b].snapping = !1))
              : ("inner" !== d.snapMode &&
                  ((n = Math.abs(h - v) <= p),
                  (s = Math.abs(c - m) <= p),
                  (o = Math.abs(a - g) <= p),
                  (r = Math.abs(l - f) <= p),
                  n &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: h - i.helperProportions.height,
                      left: 0,
                    }).top),
                  s &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: c,
                      left: 0,
                    }).top),
                  o &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a - i.helperProportions.width,
                    }).left),
                  r &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l,
                    }).left)),
                (u = n || s || o || r),
                "outer" !== d.snapMode &&
                  ((n = Math.abs(h - m) <= p),
                  (s = Math.abs(c - v) <= p),
                  (o = Math.abs(a - f) <= p),
                  (r = Math.abs(l - g) <= p),
                  n &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: h,
                      left: 0,
                    }).top),
                  s &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: c - i.helperProportions.height,
                      left: 0,
                    }).top),
                  o &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a,
                    }).left),
                  r &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l - i.helperProportions.width,
                    }).left)),
                !i.snapElements[b].snapping &&
                  (n || s || o || r || u) &&
                  i.options.snap.snap &&
                  i.options.snap.snap.call(
                    i.element,
                    e,
                    Y.extend(i._uiHash(), { snapItem: i.snapElements[b].item }),
                  ),
                (i.snapElements[b].snapping = n || s || o || r || u)));
      },
    }),
    Y.ui.plugin.add("draggable", "stack", {
      start: function (e, t, i) {
        var n,
          i = i.options,
          i = Y.makeArray(Y(i.stack)).sort(function (e, t) {
            return (
              (parseInt(Y(e).css("zIndex"), 10) || 0) -
              (parseInt(Y(t).css("zIndex"), 10) || 0)
            );
          });
        i.length &&
          ((n = parseInt(Y(i[0]).css("zIndex"), 10) || 0),
          Y(i).each(function (e) {
            Y(this).css("zIndex", n + e);
          }),
          this.css("zIndex", n + i.length));
      },
    }),
    Y.ui.plugin.add("draggable", "zIndex", {
      start: function (e, t, i) {
        ((t = Y(t.helper)), (i = i.options));
        (t.css("zIndex") && (i._zIndex = t.css("zIndex")),
          t.css("zIndex", i.zIndex));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._zIndex && Y(t.helper).css("zIndex", i._zIndex);
      },
    }));
  Y.ui.draggable;
  (Y.widget("ui.resizable", Y.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "resize",
    options: {
      alsoResize: !1,
      animate: !1,
      animateDuration: "slow",
      animateEasing: "swing",
      aspectRatio: !1,
      autoHide: !1,
      classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" },
      containment: !1,
      ghost: !1,
      grid: !1,
      handles: "e,s,se",
      helper: !1,
      maxHeight: null,
      maxWidth: null,
      minHeight: 10,
      minWidth: 10,
      zIndex: 90,
      resize: null,
      start: null,
      stop: null,
    },
    _num: function (e) {
      return parseFloat(e) || 0;
    },
    _isNumber: function (e) {
      return !isNaN(parseFloat(e));
    },
    _hasScroll: function (e, t) {
      if ("hidden" === Y(e).css("overflow")) return !1;
      var i = t && "left" === t ? "scrollLeft" : "scrollTop",
        t = !1;
      if (0 < e[i]) return !0;
      try {
        ((e[i] = 1), (t = 0 < e[i]), (e[i] = 0));
      } catch (e) {}
      return t;
    },
    _create: function () {
      var e,
        t = this.options,
        i = this;
      (this._addClass("ui-resizable"),
        Y.extend(this, {
          _aspectRatio: !!t.aspectRatio,
          aspectRatio: t.aspectRatio,
          originalElement: this.element,
          _proportionallyResizeElements: [],
          _helper:
            t.helper || t.ghost || t.animate
              ? t.helper || "ui-resizable-helper"
              : null,
        }),
        this.element[0].nodeName.match(
          /^(canvas|textarea|input|select|button|img)$/i,
        ) &&
          (this.element.wrap(
            Y("<div class='ui-wrapper'></div>").css({
              overflow: "hidden",
              position: this.element.css("position"),
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              top: this.element.css("top"),
              left: this.element.css("left"),
            }),
          ),
          (this.element = this.element
            .parent()
            .data("ui-resizable", this.element.resizable("instance"))),
          (this.elementIsWrapper = !0),
          (e = {
            marginTop: this.originalElement.css("marginTop"),
            marginRight: this.originalElement.css("marginRight"),
            marginBottom: this.originalElement.css("marginBottom"),
            marginLeft: this.originalElement.css("marginLeft"),
          }),
          this.element.css(e),
          this.originalElement.css("margin", 0),
          (this.originalResizeStyle = this.originalElement.css("resize")),
          this.originalElement.css("resize", "none"),
          this._proportionallyResizeElements.push(
            this.originalElement.css({
              position: "static",
              zoom: 1,
              display: "block",
            }),
          ),
          this.originalElement.css(e),
          this._proportionallyResize()),
        this._setupHandles(),
        t.autoHide &&
          Y(this.element)
            .on("mouseenter", function () {
              t.disabled ||
                (i._removeClass("ui-resizable-autohide"), i._handles.show());
            })
            .on("mouseleave", function () {
              t.disabled ||
                i.resizing ||
                (i._addClass("ui-resizable-autohide"), i._handles.hide());
            }),
        this._mouseInit());
    },
    _destroy: function () {
      (this._mouseDestroy(), this._addedHandles.remove());
      function e(e) {
        Y(e)
          .removeData("resizable")
          .removeData("ui-resizable")
          .off(".resizable");
      }
      var t;
      return (
        this.elementIsWrapper &&
          (e(this.element),
          (t = this.element),
          this.originalElement
            .css({
              position: t.css("position"),
              width: t.outerWidth(),
              height: t.outerHeight(),
              top: t.css("top"),
              left: t.css("left"),
            })
            .insertAfter(t),
          t.remove()),
        this.originalElement.css("resize", this.originalResizeStyle),
        e(this.originalElement),
        this
      );
    },
    _setOption: function (e, t) {
      switch ((this._super(e, t), e)) {
        case "handles":
          (this._removeHandles(), this._setupHandles());
          break;
        case "aspectRatio":
          this._aspectRatio = !!t;
      }
    },
    _setupHandles: function () {
      var e,
        t,
        i,
        n,
        s,
        o = this.options,
        r = this;
      if (
        ((this.handles =
          o.handles ||
          (Y(".ui-resizable-handle", this.element).length
            ? {
                n: ".ui-resizable-n",
                e: ".ui-resizable-e",
                s: ".ui-resizable-s",
                w: ".ui-resizable-w",
                se: ".ui-resizable-se",
                sw: ".ui-resizable-sw",
                ne: ".ui-resizable-ne",
                nw: ".ui-resizable-nw",
              }
            : "e,s,se")),
        (this._handles = Y()),
        (this._addedHandles = Y()),
        this.handles.constructor === String)
      )
        for (
          "all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"),
            i = this.handles.split(","),
            this.handles = {},
            t = 0;
          t < i.length;
          t++
        )
          ((n = "ui-resizable-" + (e = String.prototype.trim.call(i[t]))),
            (s = Y("<div>")),
            this._addClass(s, "ui-resizable-handle " + n),
            s.css({ zIndex: o.zIndex }),
            (this.handles[e] = ".ui-resizable-" + e),
            this.element.children(this.handles[e]).length ||
              (this.element.append(s),
              (this._addedHandles = this._addedHandles.add(s))));
      ((this._renderAxis = function (e) {
        var t, i, n;
        for (t in ((e = e || this.element), this.handles))
          (this.handles[t].constructor === String
            ? (this.handles[t] = this.element
                .children(this.handles[t])
                .first()
                .show())
            : (this.handles[t].jquery || this.handles[t].nodeType) &&
              ((this.handles[t] = Y(this.handles[t])),
              this._on(this.handles[t], { mousedown: r._mouseDown })),
            this.elementIsWrapper &&
              this.originalElement[0].nodeName.match(
                /^(textarea|input|select|button)$/i,
              ) &&
              ((i = Y(this.handles[t], this.element)),
              (n = /sw|ne|nw|se|n|s/.test(t)
                ? i.outerHeight()
                : i.outerWidth()),
              (i = [
                "padding",
                /ne|nw|n/.test(t)
                  ? "Top"
                  : /se|sw|s/.test(t)
                    ? "Bottom"
                    : /^e$/.test(t)
                      ? "Right"
                      : "Left",
              ].join("")),
              e.css(i, n),
              this._proportionallyResize()),
            (this._handles = this._handles.add(this.handles[t])));
      }),
        this._renderAxis(this.element),
        (this._handles = this._handles.add(
          this.element.find(".ui-resizable-handle"),
        )),
        this._handles.disableSelection(),
        this._handles.on("mouseover", function () {
          r.resizing ||
            (this.className &&
              (s = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),
            (r.axis = s && s[1] ? s[1] : "se"));
        }),
        o.autoHide &&
          (this._handles.hide(), this._addClass("ui-resizable-autohide")));
    },
    _removeHandles: function () {
      this._addedHandles.remove();
    },
    _mouseCapture: function (e) {
      var t,
        i,
        n = !1;
      for (t in this.handles)
        ((i = Y(this.handles[t])[0]) !== e.target &&
          !Y.contains(i, e.target)) ||
          (n = !0);
      return !this.options.disabled && n;
    },
    _mouseStart: function (e) {
      var t,
        i,
        n = this.options,
        s = this.element;
      return (
        (this.resizing = !0),
        this._renderProxy(),
        (t = this._num(this.helper.css("left"))),
        (i = this._num(this.helper.css("top"))),
        n.containment &&
          ((t += Y(n.containment).scrollLeft() || 0),
          (i += Y(n.containment).scrollTop() || 0)),
        (this.offset = this.helper.offset()),
        (this.position = { left: t, top: i }),
        (this.size = this._helper
          ? { width: this.helper.width(), height: this.helper.height() }
          : { width: s.width(), height: s.height() }),
        (this.originalSize = this._helper
          ? { width: s.outerWidth(), height: s.outerHeight() }
          : { width: s.width(), height: s.height() }),
        (this.sizeDiff = {
          width: s.outerWidth() - s.width(),
          height: s.outerHeight() - s.height(),
        }),
        (this.originalPosition = { left: t, top: i }),
        (this.originalMousePosition = { left: e.pageX, top: e.pageY }),
        (this.aspectRatio =
          "number" == typeof n.aspectRatio
            ? n.aspectRatio
            : this.originalSize.width / this.originalSize.height || 1),
        (n = Y(".ui-resizable-" + this.axis).css("cursor")),
        Y("body").css("cursor", "auto" === n ? this.axis + "-resize" : n),
        this._addClass("ui-resizable-resizing"),
        this._propagate("start", e),
        !0
      );
    },
    _mouseDrag: function (e) {
      var t = this.originalMousePosition,
        i = this.axis,
        n = e.pageX - t.left || 0,
        t = e.pageY - t.top || 0,
        i = this._change[i];
      return (
        this._updatePrevProperties(),
        i &&
          ((t = i.apply(this, [e, n, t])),
          this._updateVirtualBoundaries(e.shiftKey),
          (this._aspectRatio || e.shiftKey) && (t = this._updateRatio(t, e)),
          (t = this._respectSize(t, e)),
          this._updateCache(t),
          this._propagate("resize", e),
          (t = this._applyChanges()),
          !this._helper &&
            this._proportionallyResizeElements.length &&
            this._proportionallyResize(),
          Y.isEmptyObject(t) ||
            (this._updatePrevProperties(),
            this._trigger("resize", e, this.ui()),
            this._applyChanges())),
        !1
      );
    },
    _mouseStop: function (e) {
      this.resizing = !1;
      var t,
        i,
        n,
        s = this.options,
        o = this;
      return (
        this._helper &&
          ((n =
            (t =
              (i = this._proportionallyResizeElements).length &&
              /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left")
              ? 0
              : o.sizeDiff.height),
          (i = t ? 0 : o.sizeDiff.width),
          (t = { width: o.helper.width() - i, height: o.helper.height() - n }),
          (i =
            parseFloat(o.element.css("left")) +
              (o.position.left - o.originalPosition.left) || null),
          (n =
            parseFloat(o.element.css("top")) +
              (o.position.top - o.originalPosition.top) || null),
          s.animate || this.element.css(Y.extend(t, { top: n, left: i })),
          o.helper.height(o.size.height),
          o.helper.width(o.size.width),
          this._helper && !s.animate && this._proportionallyResize()),
        Y("body").css("cursor", "auto"),
        this._removeClass("ui-resizable-resizing"),
        this._propagate("stop", e),
        this._helper && this.helper.remove(),
        !1
      );
    },
    _updatePrevProperties: function () {
      ((this.prevPosition = {
        top: this.position.top,
        left: this.position.left,
      }),
        (this.prevSize = { width: this.size.width, height: this.size.height }));
    },
    _applyChanges: function () {
      var e = {};
      return (
        this.position.top !== this.prevPosition.top &&
          (e.top = this.position.top + "px"),
        this.position.left !== this.prevPosition.left &&
          (e.left = this.position.left + "px"),
        this.size.width !== this.prevSize.width &&
          (e.width = this.size.width + "px"),
        this.size.height !== this.prevSize.height &&
          (e.height = this.size.height + "px"),
        this.helper.css(e),
        e
      );
    },
    _updateVirtualBoundaries: function (e) {
      var t,
        i,
        n = this.options,
        s = {
          minWidth: this._isNumber(n.minWidth) ? n.minWidth : 0,
          maxWidth: this._isNumber(n.maxWidth) ? n.maxWidth : 1 / 0,
          minHeight: this._isNumber(n.minHeight) ? n.minHeight : 0,
          maxHeight: this._isNumber(n.maxHeight) ? n.maxHeight : 1 / 0,
        };
      ((this._aspectRatio || e) &&
        ((t = s.minHeight * this.aspectRatio),
        (i = s.minWidth / this.aspectRatio),
        (n = s.maxHeight * this.aspectRatio),
        (e = s.maxWidth / this.aspectRatio),
        t > s.minWidth && (s.minWidth = t),
        i > s.minHeight && (s.minHeight = i),
        n < s.maxWidth && (s.maxWidth = n),
        e < s.maxHeight && (s.maxHeight = e)),
        (this._vBoundaries = s));
    },
    _updateCache: function (e) {
      ((this.offset = this.helper.offset()),
        this._isNumber(e.left) && (this.position.left = e.left),
        this._isNumber(e.top) && (this.position.top = e.top),
        this._isNumber(e.height) && (this.size.height = e.height),
        this._isNumber(e.width) && (this.size.width = e.width));
    },
    _updateRatio: function (e) {
      var t = this.position,
        i = this.size,
        n = this.axis;
      return (
        this._isNumber(e.height)
          ? (e.width = e.height * this.aspectRatio)
          : this._isNumber(e.width) && (e.height = e.width / this.aspectRatio),
        "sw" === n && ((e.left = t.left + (i.width - e.width)), (e.top = null)),
        "nw" === n &&
          ((e.top = t.top + (i.height - e.height)),
          (e.left = t.left + (i.width - e.width))),
        e
      );
    },
    _respectSize: function (e) {
      var t = this._vBoundaries,
        i = this.axis,
        n = this._isNumber(e.width) && t.maxWidth && t.maxWidth < e.width,
        s = this._isNumber(e.height) && t.maxHeight && t.maxHeight < e.height,
        o = this._isNumber(e.width) && t.minWidth && t.minWidth > e.width,
        r = this._isNumber(e.height) && t.minHeight && t.minHeight > e.height,
        a = this.originalPosition.left + this.originalSize.width,
        l = this.originalPosition.top + this.originalSize.height,
        h = /sw|nw|w/.test(i),
        i = /nw|ne|n/.test(i);
      return (
        o && (e.width = t.minWidth),
        r && (e.height = t.minHeight),
        n && (e.width = t.maxWidth),
        s && (e.height = t.maxHeight),
        o && h && (e.left = a - t.minWidth),
        n && h && (e.left = a - t.maxWidth),
        r && i && (e.top = l - t.minHeight),
        s && i && (e.top = l - t.maxHeight),
        e.width || e.height || e.left || !e.top
          ? e.width || e.height || e.top || !e.left || (e.left = null)
          : (e.top = null),
        e
      );
    },
    _getPaddingPlusBorderDimensions: function (e) {
      for (
        var t = 0,
          i = [],
          n = [
            e.css("borderTopWidth"),
            e.css("borderRightWidth"),
            e.css("borderBottomWidth"),
            e.css("borderLeftWidth"),
          ],
          s = [
            e.css("paddingTop"),
            e.css("paddingRight"),
            e.css("paddingBottom"),
            e.css("paddingLeft"),
          ];
        t < 4;
        t++
      )
        ((i[t] = parseFloat(n[t]) || 0), (i[t] += parseFloat(s[t]) || 0));
      return { height: i[0] + i[2], width: i[1] + i[3] };
    },
    _proportionallyResize: function () {
      if (this._proportionallyResizeElements.length)
        for (
          var e, t = 0, i = this.helper || this.element;
          t < this._proportionallyResizeElements.length;
          t++
        )
          ((e = this._proportionallyResizeElements[t]),
            this.outerDimensions ||
              (this.outerDimensions = this._getPaddingPlusBorderDimensions(e)),
            e.css({
              height: i.height() - this.outerDimensions.height || 0,
              width: i.width() - this.outerDimensions.width || 0,
            }));
    },
    _renderProxy: function () {
      var e = this.element,
        t = this.options;
      ((this.elementOffset = e.offset()),
        this._helper
          ? ((this.helper =
              this.helper || Y("<div></div>").css({ overflow: "hidden" })),
            this._addClass(this.helper, this._helper),
            this.helper.css({
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              position: "absolute",
              left: this.elementOffset.left + "px",
              top: this.elementOffset.top + "px",
              zIndex: ++t.zIndex,
            }),
            this.helper.appendTo("body").disableSelection())
          : (this.helper = this.element));
    },
    _change: {
      e: function (e, t) {
        return { width: this.originalSize.width + t };
      },
      w: function (e, t) {
        var i = this.originalSize;
        return { left: this.originalPosition.left + t, width: i.width - t };
      },
      n: function (e, t, i) {
        var n = this.originalSize;
        return { top: this.originalPosition.top + i, height: n.height - i };
      },
      s: function (e, t, i) {
        return { height: this.originalSize.height + i };
      },
      se: function (e, t, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.e.apply(this, [e, t, i]),
        );
      },
      sw: function (e, t, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.w.apply(this, [e, t, i]),
        );
      },
      ne: function (e, t, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.e.apply(this, [e, t, i]),
        );
      },
      nw: function (e, t, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.w.apply(this, [e, t, i]),
        );
      },
    },
    _propagate: function (e, t) {
      (Y.ui.plugin.call(this, e, [t, this.ui()]),
        "resize" !== e && this._trigger(e, t, this.ui()));
    },
    plugins: {},
    ui: function () {
      return {
        originalElement: this.originalElement,
        element: this.element,
        helper: this.helper,
        position: this.position,
        size: this.size,
        originalSize: this.originalSize,
        originalPosition: this.originalPosition,
      };
    },
  }),
    Y.ui.plugin.add("resizable", "animate", {
      stop: function (t) {
        var i = Y(this).resizable("instance"),
          e = i.options,
          n = i._proportionallyResizeElements,
          s = n.length && /textarea/i.test(n[0].nodeName),
          o = s && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height,
          r = s ? 0 : i.sizeDiff.width,
          s = { width: i.size.width - r, height: i.size.height - o },
          r =
            parseFloat(i.element.css("left")) +
              (i.position.left - i.originalPosition.left) || null,
          o =
            parseFloat(i.element.css("top")) +
              (i.position.top - i.originalPosition.top) || null;
        i.element.animate(Y.extend(s, o && r ? { top: o, left: r } : {}), {
          duration: e.animateDuration,
          easing: e.animateEasing,
          step: function () {
            var e = {
              width: parseFloat(i.element.css("width")),
              height: parseFloat(i.element.css("height")),
              top: parseFloat(i.element.css("top")),
              left: parseFloat(i.element.css("left")),
            };
            (n && n.length && Y(n[0]).css({ width: e.width, height: e.height }),
              i._updateCache(e),
              i._propagate("resize", t));
          },
        });
      },
    }),
    Y.ui.plugin.add("resizable", "containment", {
      start: function () {
        var i,
          n,
          s = Y(this).resizable("instance"),
          e = s.options,
          t = s.element,
          o = e.containment,
          r =
            o instanceof Y
              ? o.get(0)
              : /parent/.test(o)
                ? t.parent().get(0)
                : o;
        r &&
          ((s.containerElement = Y(r)),
          /document/.test(o) || o === document
            ? ((s.containerOffset = { left: 0, top: 0 }),
              (s.containerPosition = { left: 0, top: 0 }),
              (s.parentData = {
                element: Y(document),
                left: 0,
                top: 0,
                width: Y(document).width(),
                height:
                  Y(document).height() || document.body.parentNode.scrollHeight,
              }))
            : ((i = Y(r)),
              (n = []),
              Y(["Top", "Right", "Left", "Bottom"]).each(function (e, t) {
                n[e] = s._num(i.css("padding" + t));
              }),
              (s.containerOffset = i.offset()),
              (s.containerPosition = i.position()),
              (s.containerSize = {
                height: i.innerHeight() - n[3],
                width: i.innerWidth() - n[1],
              }),
              (e = s.containerOffset),
              (t = s.containerSize.height),
              (o = s.containerSize.width),
              (o = s._hasScroll(r, "left") ? r.scrollWidth : o),
              (t = s._hasScroll(r) ? r.scrollHeight : t),
              (s.parentData = {
                element: r,
                left: e.left,
                top: e.top,
                width: o,
                height: t,
              })));
      },
      resize: function (e) {
        var t = Y(this).resizable("instance"),
          i = t.options,
          n = t.containerOffset,
          s = t.position,
          o = t._aspectRatio || e.shiftKey,
          r = { top: 0, left: 0 },
          a = t.containerElement,
          e = !0;
        (a[0] !== document && /static/.test(a.css("position")) && (r = n),
          s.left < (t._helper ? n.left : 0) &&
            ((t.size.width =
              t.size.width +
              (t._helper
                ? t.position.left - n.left
                : t.position.left - r.left)),
            o && ((t.size.height = t.size.width / t.aspectRatio), (e = !1)),
            (t.position.left = i.helper ? n.left : 0)),
          s.top < (t._helper ? n.top : 0) &&
            ((t.size.height =
              t.size.height +
              (t._helper ? t.position.top - n.top : t.position.top)),
            o && ((t.size.width = t.size.height * t.aspectRatio), (e = !1)),
            (t.position.top = t._helper ? n.top : 0)),
          (i = t.containerElement.get(0) === t.element.parent().get(0)),
          (s = /relative|absolute/.test(t.containerElement.css("position"))),
          i && s
            ? ((t.offset.left = t.parentData.left + t.position.left),
              (t.offset.top = t.parentData.top + t.position.top))
            : ((t.offset.left = t.element.offset().left),
              (t.offset.top = t.element.offset().top)),
          (s = Math.abs(
            t.sizeDiff.width +
              (t._helper ? t.offset.left - r.left : t.offset.left - n.left),
          )),
          (n = Math.abs(
            t.sizeDiff.height +
              (t._helper ? t.offset.top - r.top : t.offset.top - n.top),
          )),
          s + t.size.width >= t.parentData.width &&
            ((t.size.width = t.parentData.width - s),
            o && ((t.size.height = t.size.width / t.aspectRatio), (e = !1))),
          n + t.size.height >= t.parentData.height &&
            ((t.size.height = t.parentData.height - n),
            o && ((t.size.width = t.size.height * t.aspectRatio), (e = !1))),
          e ||
            ((t.position.left = t.prevPosition.left),
            (t.position.top = t.prevPosition.top),
            (t.size.width = t.prevSize.width),
            (t.size.height = t.prevSize.height)));
      },
      stop: function () {
        var e = Y(this).resizable("instance"),
          t = e.options,
          i = e.containerOffset,
          n = e.containerPosition,
          s = e.containerElement,
          o = Y(e.helper),
          r = o.offset(),
          a = o.outerWidth() - e.sizeDiff.width,
          o = o.outerHeight() - e.sizeDiff.height;
        (e._helper &&
          !t.animate &&
          /relative/.test(s.css("position")) &&
          Y(this).css({ left: r.left - n.left - i.left, width: a, height: o }),
          e._helper &&
            !t.animate &&
            /static/.test(s.css("position")) &&
            Y(this).css({
              left: r.left - n.left - i.left,
              width: a,
              height: o,
            }));
      },
    }),
    Y.ui.plugin.add("resizable", "alsoResize", {
      start: function () {
        var e = Y(this).resizable("instance").options;
        Y(e.alsoResize).each(function () {
          var e = Y(this);
          e.data("ui-resizable-alsoresize", {
            width: parseFloat(e.width()),
            height: parseFloat(e.height()),
            left: parseFloat(e.css("left")),
            top: parseFloat(e.css("top")),
          });
        });
      },
      resize: function (e, i) {
        var t = Y(this).resizable("instance"),
          n = t.options,
          s = t.originalSize,
          o = t.originalPosition,
          r = {
            height: t.size.height - s.height || 0,
            width: t.size.width - s.width || 0,
            top: t.position.top - o.top || 0,
            left: t.position.left - o.left || 0,
          };
        Y(n.alsoResize).each(function () {
          var e = Y(this),
            n = Y(this).data("ui-resizable-alsoresize"),
            s = {},
            t = e.parents(i.originalElement[0]).length
              ? ["width", "height"]
              : ["width", "height", "top", "left"];
          (Y.each(t, function (e, t) {
            var i = (n[t] || 0) + (r[t] || 0);
            i && 0 <= i && (s[t] = i || null);
          }),
            e.css(s));
        });
      },
      stop: function () {
        Y(this).removeData("ui-resizable-alsoresize");
      },
    }),
    Y.ui.plugin.add("resizable", "ghost", {
      start: function () {
        var e = Y(this).resizable("instance"),
          t = e.size;
        ((e.ghost = e.originalElement.clone()),
          e.ghost.css({
            opacity: 0.25,
            display: "block",
            position: "relative",
            height: t.height,
            width: t.width,
            margin: 0,
            left: 0,
            top: 0,
          }),
          e._addClass(e.ghost, "ui-resizable-ghost"),
          !1 !== Y.uiBackCompat &&
            "string" == typeof e.options.ghost &&
            e.ghost.addClass(this.options.ghost),
          e.ghost.appendTo(e.helper));
      },
      resize: function () {
        var e = Y(this).resizable("instance");
        e.ghost &&
          e.ghost.css({
            position: "relative",
            height: e.size.height,
            width: e.size.width,
          });
      },
      stop: function () {
        var e = Y(this).resizable("instance");
        e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0));
      },
    }),
    Y.ui.plugin.add("resizable", "grid", {
      resize: function () {
        var e,
          t = Y(this).resizable("instance"),
          i = t.options,
          n = t.size,
          s = t.originalSize,
          o = t.originalPosition,
          r = t.axis,
          a = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
          l = a[0] || 1,
          h = a[1] || 1,
          c = Math.round((n.width - s.width) / l) * l,
          u = Math.round((n.height - s.height) / h) * h,
          d = s.width + c,
          p = s.height + u,
          f = i.maxWidth && i.maxWidth < d,
          g = i.maxHeight && i.maxHeight < p,
          m = i.minWidth && i.minWidth > d,
          n = i.minHeight && i.minHeight > p;
        ((i.grid = a),
          m && (d += l),
          n && (p += h),
          f && (d -= l),
          g && (p -= h),
          /^(se|s|e)$/.test(r)
            ? ((t.size.width = d), (t.size.height = p))
            : /^(ne)$/.test(r)
              ? ((t.size.width = d),
                (t.size.height = p),
                (t.position.top = o.top - u))
              : /^(sw)$/.test(r)
                ? ((t.size.width = d),
                  (t.size.height = p),
                  (t.position.left = o.left - c))
                : ((p - h <= 0 || d - l <= 0) &&
                    (e = t._getPaddingPlusBorderDimensions(this)),
                  0 < p - h
                    ? ((t.size.height = p), (t.position.top = o.top - u))
                    : ((p = h - e.height),
                      (t.size.height = p),
                      (t.position.top = o.top + s.height - p)),
                  0 < d - l
                    ? ((t.size.width = d), (t.position.left = o.left - c))
                    : ((d = l - e.width),
                      (t.size.width = d),
                      (t.position.left = o.left + s.width - d))));
      },
    }));
  Y.ui.resizable;
  (Y.widget("ui.dialog", {
    version: "1.13.0",
    options: {
      appendTo: "body",
      autoOpen: !0,
      buttons: [],
      classes: {
        "ui-dialog": "ui-corner-all",
        "ui-dialog-titlebar": "ui-corner-all",
      },
      closeOnEscape: !0,
      closeText: "Close",
      draggable: !0,
      hide: null,
      height: "auto",
      maxHeight: null,
      maxWidth: null,
      minHeight: 150,
      minWidth: 150,
      modal: !1,
      position: {
        my: "center",
        at: "center",
        of: window,
        collision: "fit",
        using: function (e) {
          var t = Y(this).css(e).offset().top;
          t < 0 && Y(this).css("top", e.top - t);
        },
      },
      resizable: !0,
      show: null,
      title: null,
      width: 300,
      beforeClose: null,
      close: null,
      drag: null,
      dragStart: null,
      dragStop: null,
      focus: null,
      open: null,
      resize: null,
      resizeStart: null,
      resizeStop: null,
    },
    sizeRelatedOptions: {
      buttons: !0,
      height: !0,
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
      width: !0,
    },
    resizableRelatedOptions: {
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
    },
    _create: function () {
      ((this.originalCss = {
        display: this.element[0].style.display,
        width: this.element[0].style.width,
        minHeight: this.element[0].style.minHeight,
        maxHeight: this.element[0].style.maxHeight,
        height: this.element[0].style.height,
      }),
        (this.originalPosition = {
          parent: this.element.parent(),
          index: this.element.parent().children().index(this.element),
        }),
        (this.originalTitle = this.element.attr("title")),
        null == this.options.title &&
          null != this.originalTitle &&
          (this.options.title = this.originalTitle),
        this.options.disabled && (this.options.disabled = !1),
        this._createWrapper(),
        this.element.show().removeAttr("title").appendTo(this.uiDialog),
        this._addClass("ui-dialog-content", "ui-widget-content"),
        this._createTitlebar(),
        this._createButtonPane(),
        this.options.draggable && Y.fn.draggable && this._makeDraggable(),
        this.options.resizable && Y.fn.resizable && this._makeResizable(),
        (this._isOpen = !1),
        this._trackFocus());
    },
    _init: function () {
      this.options.autoOpen && this.open();
    },
    _appendTo: function () {
      var e = this.options.appendTo;
      return e && (e.jquery || e.nodeType)
        ? Y(e)
        : this.document.find(e || "body").eq(0);
    },
    _destroy: function () {
      var e,
        t = this.originalPosition;
      (this._untrackInstance(),
        this._destroyOverlay(),
        this.element.removeUniqueId().css(this.originalCss).detach(),
        this.uiDialog.remove(),
        this.originalTitle && this.element.attr("title", this.originalTitle),
        (e = t.parent.children().eq(t.index)).length && e[0] !== this.element[0]
          ? e.before(this.element)
          : t.parent.append(this.element));
    },
    widget: function () {
      return this.uiDialog;
    },
    disable: Y.noop,
    enable: Y.noop,
    close: function (e) {
      var t = this;
      this._isOpen &&
        !1 !== this._trigger("beforeClose", e) &&
        ((this._isOpen = !1),
        (this._focusedElement = null),
        this._destroyOverlay(),
        this._untrackInstance(),
        this.opener.filter(":focusable").trigger("focus").length ||
          Y.ui.safeBlur(Y.ui.safeActiveElement(this.document[0])),
        this._hide(this.uiDialog, this.options.hide, function () {
          t._trigger("close", e);
        }));
    },
    isOpen: function () {
      return this._isOpen;
    },
    moveToTop: function () {
      this._moveToTop();
    },
    _moveToTop: function (e, t) {
      var i = !1,
        n = this.uiDialog
          .siblings(".ui-front:visible")
          .map(function () {
            return +Y(this).css("z-index");
          })
          .get(),
        n = Math.max.apply(null, n);
      return (
        n >= +this.uiDialog.css("z-index") &&
          (this.uiDialog.css("z-index", n + 1), (i = !0)),
        i && !t && this._trigger("focus", e),
        i
      );
    },
    open: function () {
      var e = this;
      this._isOpen
        ? this._moveToTop() && this._focusTabbable()
        : ((this._isOpen = !0),
          (this.opener = Y(Y.ui.safeActiveElement(this.document[0]))),
          this._size(),
          this._position(),
          this._createOverlay(),
          this._moveToTop(null, !0),
          this.overlay &&
            this.overlay.css("z-index", this.uiDialog.css("z-index") - 1),
          this._show(this.uiDialog, this.options.show, function () {
            (e._focusTabbable(), e._trigger("focus"));
          }),
          this._makeFocusTarget(),
          this._trigger("open"));
    },
    _focusTabbable: function () {
      var e = this._focusedElement;
      (e = !(e = !(e = !(e = !(e = e || this.element.find("[autofocus]")).length
        ? this.element.find(":tabbable")
        : e).length
        ? this.uiDialogButtonPane.find(":tabbable")
        : e).length
        ? this.uiDialogTitlebarClose.filter(":tabbable")
        : e).length
        ? this.uiDialog
        : e)
        .eq(0)
        .trigger("focus");
    },
    _restoreTabbableFocus: function () {
      var e = Y.ui.safeActiveElement(this.document[0]);
      this.uiDialog[0] === e ||
        Y.contains(this.uiDialog[0], e) ||
        this._focusTabbable();
    },
    _keepFocus: function (e) {
      (e.preventDefault(),
        this._restoreTabbableFocus(),
        this._delay(this._restoreTabbableFocus));
    },
    _createWrapper: function () {
      ((this.uiDialog = Y("<div>")
        .hide()
        .attr({ tabIndex: -1, role: "dialog" })
        .appendTo(this._appendTo())),
        this._addClass(
          this.uiDialog,
          "ui-dialog",
          "ui-widget ui-widget-content ui-front",
        ),
        this._on(this.uiDialog, {
          keydown: function (e) {
            if (
              this.options.closeOnEscape &&
              !e.isDefaultPrevented() &&
              e.keyCode &&
              e.keyCode === Y.ui.keyCode.ESCAPE
            )
              return (e.preventDefault(), void this.close(e));
            var t, i, n;
            e.keyCode !== Y.ui.keyCode.TAB ||
              e.isDefaultPrevented() ||
              ((t = this.uiDialog.find(":tabbable")),
              (i = t.first()),
              (n = t.last()),
              (e.target !== n[0] && e.target !== this.uiDialog[0]) || e.shiftKey
                ? (e.target !== i[0] && e.target !== this.uiDialog[0]) ||
                  !e.shiftKey ||
                  (this._delay(function () {
                    n.trigger("focus");
                  }),
                  e.preventDefault())
                : (this._delay(function () {
                    i.trigger("focus");
                  }),
                  e.preventDefault()));
          },
          mousedown: function (e) {
            this._moveToTop(e) && this._focusTabbable();
          },
        }),
        this.element.find("[aria-describedby]").length ||
          this.uiDialog.attr({
            "aria-describedby": this.element.uniqueId().attr("id"),
          }));
    },
    _createTitlebar: function () {
      var e;
      ((this.uiDialogTitlebar = Y("<div>")),
        this._addClass(
          this.uiDialogTitlebar,
          "ui-dialog-titlebar",
          "ui-widget-header ui-helper-clearfix",
        ),
        this._on(this.uiDialogTitlebar, {
          mousedown: function (e) {
            Y(e.target).closest(".ui-dialog-titlebar-close") ||
              this.uiDialog.trigger("focus");
          },
        }),
        (this.uiDialogTitlebarClose = Y("<button type='button'></button>")
          .button({
            label: Y("<a>").text(this.options.closeText).html(),
            icon: "ui-icon-closethick",
            showLabel: !1,
          })
          .appendTo(this.uiDialogTitlebar)),
        this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"),
        this._on(this.uiDialogTitlebarClose, {
          click: function (e) {
            (e.preventDefault(), this.close(e));
          },
        }),
        (e = Y("<span>").uniqueId().prependTo(this.uiDialogTitlebar)),
        this._addClass(e, "ui-dialog-title"),
        this._title(e),
        this.uiDialogTitlebar.prependTo(this.uiDialog),
        this.uiDialog.attr({ "aria-labelledby": e.attr("id") }));
    },
    _title: function (e) {
      this.options.title ? e.text(this.options.title) : e.html("&#160;");
    },
    _createButtonPane: function () {
      ((this.uiDialogButtonPane = Y("<div>")),
        this._addClass(
          this.uiDialogButtonPane,
          "ui-dialog-buttonpane",
          "ui-widget-content ui-helper-clearfix",
        ),
        (this.uiButtonSet = Y("<div>").appendTo(this.uiDialogButtonPane)),
        this._addClass(this.uiButtonSet, "ui-dialog-buttonset"),
        this._createButtons());
    },
    _createButtons: function () {
      var n = this,
        e = this.options.buttons;
      (this.uiDialogButtonPane.remove(),
        this.uiButtonSet.empty(),
        Y.isEmptyObject(e) || (Array.isArray(e) && !e.length)
          ? this._removeClass(this.uiDialog, "ui-dialog-buttons")
          : (Y.each(e, function (e, t) {
              var i;
              ((t = Y.extend(
                { type: "button" },
                (t = "function" == typeof t ? { click: t, text: e } : t),
              )),
                (i = t.click),
                (e = {
                  icon: t.icon,
                  iconPosition: t.iconPosition,
                  showLabel: t.showLabel,
                  icons: t.icons,
                  text: t.text,
                }),
                delete t.click,
                delete t.icon,
                delete t.iconPosition,
                delete t.showLabel,
                delete t.icons,
                "boolean" == typeof t.text && delete t.text,
                Y("<button></button>", t)
                  .button(e)
                  .appendTo(n.uiButtonSet)
                  .on("click", function () {
                    i.apply(n.element[0], arguments);
                  }));
            }),
            this._addClass(this.uiDialog, "ui-dialog-buttons"),
            this.uiDialogButtonPane.appendTo(this.uiDialog)));
    },
    _makeDraggable: function () {
      var s = this,
        o = this.options;
      function r(e) {
        return { position: e.position, offset: e.offset };
      }
      this.uiDialog.draggable({
        cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
        handle: ".ui-dialog-titlebar",
        containment: "document",
        start: function (e, t) {
          (s._addClass(Y(this), "ui-dialog-dragging"),
            s._blockFrames(),
            s._trigger("dragStart", e, r(t)));
        },
        drag: function (e, t) {
          s._trigger("drag", e, r(t));
        },
        stop: function (e, t) {
          var i = t.offset.left - s.document.scrollLeft(),
            n = t.offset.top - s.document.scrollTop();
          ((o.position = {
            my: "left top",
            at:
              "left" +
              (0 <= i ? "+" : "") +
              i +
              " top" +
              (0 <= n ? "+" : "") +
              n,
            of: s.window,
          }),
            s._removeClass(Y(this), "ui-dialog-dragging"),
            s._unblockFrames(),
            s._trigger("dragStop", e, r(t)));
        },
      });
    },
    _makeResizable: function () {
      var s = this,
        o = this.options,
        e = o.resizable,
        t = this.uiDialog.css("position"),
        e = "string" == typeof e ? e : "n,e,s,w,se,sw,ne,nw";
      function r(e) {
        return {
          originalPosition: e.originalPosition,
          originalSize: e.originalSize,
          position: e.position,
          size: e.size,
        };
      }
      this.uiDialog
        .resizable({
          cancel: ".ui-dialog-content",
          containment: "document",
          alsoResize: this.element,
          maxWidth: o.maxWidth,
          maxHeight: o.maxHeight,
          minWidth: o.minWidth,
          minHeight: this._minHeight(),
          handles: e,
          start: function (e, t) {
            (s._addClass(Y(this), "ui-dialog-resizing"),
              s._blockFrames(),
              s._trigger("resizeStart", e, r(t)));
          },
          resize: function (e, t) {
            s._trigger("resize", e, r(t));
          },
          stop: function (e, t) {
            var i = s.uiDialog.offset(),
              n = i.left - s.document.scrollLeft(),
              i = i.top - s.document.scrollTop();
            ((o.height = s.uiDialog.height()),
              (o.width = s.uiDialog.width()),
              (o.position = {
                my: "left top",
                at:
                  "left" +
                  (0 <= n ? "+" : "") +
                  n +
                  " top" +
                  (0 <= i ? "+" : "") +
                  i,
                of: s.window,
              }),
              s._removeClass(Y(this), "ui-dialog-resizing"),
              s._unblockFrames(),
              s._trigger("resizeStop", e, r(t)));
          },
        })
        .css("position", t);
    },
    _trackFocus: function () {
      this._on(this.widget(), {
        focusin: function (e) {
          (this._makeFocusTarget(), (this._focusedElement = Y(e.target)));
        },
      });
    },
    _makeFocusTarget: function () {
      (this._untrackInstance(), this._trackingInstances().unshift(this));
    },
    _untrackInstance: function () {
      var e = this._trackingInstances(),
        t = Y.inArray(this, e);
      -1 !== t && e.splice(t, 1);
    },
    _trackingInstances: function () {
      var e = this.document.data("ui-dialog-instances");
      return (e || this.document.data("ui-dialog-instances", (e = [])), e);
    },
    _minHeight: function () {
      var e = this.options;
      return "auto" === e.height
        ? e.minHeight
        : Math.min(e.minHeight, e.height);
    },
    _position: function () {
      var e = this.uiDialog.is(":visible");
      (e || this.uiDialog.show(),
        this.uiDialog.position(this.options.position),
        e || this.uiDialog.hide());
    },
    _setOptions: function (e) {
      var i = this,
        n = !1,
        s = {};
      (Y.each(e, function (e, t) {
        (i._setOption(e, t),
          e in i.sizeRelatedOptions && (n = !0),
          e in i.resizableRelatedOptions && (s[e] = t));
      }),
        n && (this._size(), this._position()),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", s));
    },
    _setOption: function (e, t) {
      var i,
        n = this.uiDialog;
      "disabled" !== e &&
        (this._super(e, t),
        "appendTo" === e && this.uiDialog.appendTo(this._appendTo()),
        "buttons" === e && this._createButtons(),
        "closeText" === e &&
          this.uiDialogTitlebarClose.button({
            label: Y("<a>")
              .text("" + this.options.closeText)
              .html(),
          }),
        "draggable" === e &&
          ((i = n.is(":data(ui-draggable)")) && !t && n.draggable("destroy"),
          !i && t && this._makeDraggable()),
        "position" === e && this._position(),
        "resizable" === e &&
          ((i = n.is(":data(ui-resizable)")) && !t && n.resizable("destroy"),
          i && "string" == typeof t && n.resizable("option", "handles", t),
          i || !1 === t || this._makeResizable()),
        "title" === e &&
          this._title(this.uiDialogTitlebar.find(".ui-dialog-title")));
    },
    _size: function () {
      var e,
        t,
        i,
        n = this.options;
      (this.element
        .show()
        .css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }),
        n.minWidth > n.width && (n.width = n.minWidth),
        (e = this.uiDialog
          .css({ height: "auto", width: n.width })
          .outerHeight()),
        (t = Math.max(0, n.minHeight - e)),
        (i =
          "number" == typeof n.maxHeight
            ? Math.max(0, n.maxHeight - e)
            : "none"),
        "auto" === n.height
          ? this.element.css({ minHeight: t, maxHeight: i, height: "auto" })
          : this.element.height(Math.max(0, n.height - e)),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", "minHeight", this._minHeight()));
    },
    _blockFrames: function () {
      this.iframeBlocks = this.document.find("iframe").map(function () {
        var e = Y(this);
        return Y("<div>")
          .css({
            position: "absolute",
            width: e.outerWidth(),
            height: e.outerHeight(),
          })
          .appendTo(e.parent())
          .offset(e.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _allowInteraction: function (e) {
      return (
        !!Y(e.target).closest(".ui-dialog").length ||
        !!Y(e.target).closest(".ui-datepicker").length
      );
    },
    _createOverlay: function () {
      var i, n;
      this.options.modal &&
        ((i = Y.fn.jquery.substring(0, 4)),
        (n = !0),
        this._delay(function () {
          n = !1;
        }),
        this.document.data("ui-dialog-overlays") ||
          this.document.on(
            "focusin.ui-dialog",
            function (e) {
              var t;
              n ||
                (t = this._trackingInstances()[0])._allowInteraction(e) ||
                (e.preventDefault(),
                t._focusTabbable(),
                ("3.4." !== i && "3.5." !== i) ||
                  t._delay(t._restoreTabbableFocus));
            }.bind(this),
          ),
        (this.overlay = Y("<div>").appendTo(this._appendTo())),
        this._addClass(this.overlay, null, "ui-widget-overlay ui-front"),
        this._on(this.overlay, { mousedown: "_keepFocus" }),
        this.document.data(
          "ui-dialog-overlays",
          (this.document.data("ui-dialog-overlays") || 0) + 1,
        ));
    },
    _destroyOverlay: function () {
      var e;
      this.options.modal &&
        this.overlay &&
        ((e = this.document.data("ui-dialog-overlays") - 1)
          ? this.document.data("ui-dialog-overlays", e)
          : (this.document.off("focusin.ui-dialog"),
            this.document.removeData("ui-dialog-overlays")),
        this.overlay.remove(),
        (this.overlay = null));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.dialog", Y.ui.dialog, {
        options: { dialogClass: "" },
        _createWrapper: function () {
          (this._super(), this.uiDialog.addClass(this.options.dialogClass));
        },
        _setOption: function (e, t) {
          ("dialogClass" === e &&
            this.uiDialog.removeClass(this.options.dialogClass).addClass(t),
            this._superApply(arguments));
        },
      }));
  Y.ui.dialog;
  function le(e, t, i) {
    return t <= e && e < t + i;
  }
  (Y.widget("ui.droppable", {
    version: "1.13.0",
    widgetEventPrefix: "drop",
    options: {
      accept: "*",
      addClasses: !0,
      greedy: !1,
      scope: "default",
      tolerance: "intersect",
      activate: null,
      deactivate: null,
      drop: null,
      out: null,
      over: null,
    },
    _create: function () {
      var e,
        t = this.options,
        i = t.accept;
      ((this.isover = !1),
        (this.isout = !0),
        (this.accept =
          "function" == typeof i
            ? i
            : function (e) {
                return e.is(i);
              }),
        (this.proportions = function () {
          if (!arguments.length)
            return (e = e || {
              width: this.element[0].offsetWidth,
              height: this.element[0].offsetHeight,
            });
          e = arguments[0];
        }),
        this._addToManager(t.scope),
        t.addClasses && this._addClass("ui-droppable"));
    },
    _addToManager: function (e) {
      ((Y.ui.ddmanager.droppables[e] = Y.ui.ddmanager.droppables[e] || []),
        Y.ui.ddmanager.droppables[e].push(this));
    },
    _splice: function (e) {
      for (var t = 0; t < e.length; t++) e[t] === this && e.splice(t, 1);
    },
    _destroy: function () {
      var e = Y.ui.ddmanager.droppables[this.options.scope];
      this._splice(e);
    },
    _setOption: function (e, t) {
      var i;
      ("accept" === e
        ? (this.accept =
            "function" == typeof t
              ? t
              : function (e) {
                  return e.is(t);
                })
        : "scope" === e &&
          ((i = Y.ui.ddmanager.droppables[this.options.scope]),
          this._splice(i),
          this._addToManager(t)),
        this._super(e, t));
    },
    _activate: function (e) {
      var t = Y.ui.ddmanager.current;
      (this._addActiveClass(), t && this._trigger("activate", e, this.ui(t)));
    },
    _deactivate: function (e) {
      var t = Y.ui.ddmanager.current;
      (this._removeActiveClass(),
        t && this._trigger("deactivate", e, this.ui(t)));
    },
    _over: function (e) {
      var t = Y.ui.ddmanager.current;
      t &&
        (t.currentItem || t.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], t.currentItem || t.element) &&
        (this._addHoverClass(), this._trigger("over", e, this.ui(t)));
    },
    _out: function (e) {
      var t = Y.ui.ddmanager.current;
      t &&
        (t.currentItem || t.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], t.currentItem || t.element) &&
        (this._removeHoverClass(), this._trigger("out", e, this.ui(t)));
    },
    _drop: function (t, e) {
      var i = e || Y.ui.ddmanager.current,
        n = !1;
      return (
        !(!i || (i.currentItem || i.element)[0] === this.element[0]) &&
        (this.element
          .find(":data(ui-droppable)")
          .not(".ui-draggable-dragging")
          .each(function () {
            var e = Y(this).droppable("instance");
            if (
              e.options.greedy &&
              !e.options.disabled &&
              e.options.scope === i.options.scope &&
              e.accept.call(e.element[0], i.currentItem || i.element) &&
              Y.ui.intersect(
                i,
                Y.extend(e, { offset: e.element.offset() }),
                e.options.tolerance,
                t,
              )
            )
              return !(n = !0);
          }),
        !n &&
          !!this.accept.call(this.element[0], i.currentItem || i.element) &&
          (this._removeActiveClass(),
          this._removeHoverClass(),
          this._trigger("drop", t, this.ui(i)),
          this.element))
      );
    },
    ui: function (e) {
      return {
        draggable: e.currentItem || e.element,
        helper: e.helper,
        position: e.position,
        offset: e.positionAbs,
      };
    },
    _addHoverClass: function () {
      this._addClass("ui-droppable-hover");
    },
    _removeHoverClass: function () {
      this._removeClass("ui-droppable-hover");
    },
    _addActiveClass: function () {
      this._addClass("ui-droppable-active");
    },
    _removeActiveClass: function () {
      this._removeClass("ui-droppable-active");
    },
  }),
    (Y.ui.intersect = function (e, t, i, n) {
      if (!t.offset) return !1;
      var s = (e.positionAbs || e.position.absolute).left + e.margins.left,
        o = (e.positionAbs || e.position.absolute).top + e.margins.top,
        r = s + e.helperProportions.width,
        a = o + e.helperProportions.height,
        l = t.offset.left,
        h = t.offset.top,
        c = l + t.proportions().width,
        u = h + t.proportions().height;
      switch (i) {
        case "fit":
          return l <= s && r <= c && h <= o && a <= u;
        case "intersect":
          return (
            l < s + e.helperProportions.width / 2 &&
            r - e.helperProportions.width / 2 < c &&
            h < o + e.helperProportions.height / 2 &&
            a - e.helperProportions.height / 2 < u
          );
        case "pointer":
          return (
            le(n.pageY, h, t.proportions().height) &&
            le(n.pageX, l, t.proportions().width)
          );
        case "touch":
          return (
            ((h <= o && o <= u) || (h <= a && a <= u) || (o < h && u < a)) &&
            ((l <= s && s <= c) || (l <= r && r <= c) || (s < l && c < r))
          );
        default:
          return !1;
      }
    }),
    !(Y.ui.ddmanager = {
      current: null,
      droppables: { default: [] },
      prepareOffsets: function (e, t) {
        var i,
          n,
          s = Y.ui.ddmanager.droppables[e.options.scope] || [],
          o = t ? t.type : null,
          r = (e.currentItem || e.element)
            .find(":data(ui-droppable)")
            .addBack();
        e: for (i = 0; i < s.length; i++)
          if (
            !(
              s[i].options.disabled ||
              (e &&
                !s[i].accept.call(s[i].element[0], e.currentItem || e.element))
            )
          ) {
            for (n = 0; n < r.length; n++)
              if (r[n] === s[i].element[0]) {
                s[i].proportions().height = 0;
                continue e;
              }
            ((s[i].visible = "none" !== s[i].element.css("display")),
              s[i].visible &&
                ("mousedown" === o && s[i]._activate.call(s[i], t),
                (s[i].offset = s[i].element.offset()),
                s[i].proportions({
                  width: s[i].element[0].offsetWidth,
                  height: s[i].element[0].offsetHeight,
                })));
          }
      },
      drop: function (e, t) {
        var i = !1;
        return (
          Y.each(
            (Y.ui.ddmanager.droppables[e.options.scope] || []).slice(),
            function () {
              this.options &&
                (!this.options.disabled &&
                  this.visible &&
                  Y.ui.intersect(e, this, this.options.tolerance, t) &&
                  (i = this._drop.call(this, t) || i),
                !this.options.disabled &&
                  this.visible &&
                  this.accept.call(
                    this.element[0],
                    e.currentItem || e.element,
                  ) &&
                  ((this.isout = !0),
                  (this.isover = !1),
                  this._deactivate.call(this, t)));
            },
          ),
          i
        );
      },
      dragStart: function (e, t) {
        e.element.parentsUntil("body").on("scroll.droppable", function () {
          e.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(e, t);
        });
      },
      drag: function (s, o) {
        (s.options.refreshPositions && Y.ui.ddmanager.prepareOffsets(s, o),
          Y.each(Y.ui.ddmanager.droppables[s.options.scope] || [], function () {
            var e, t, i, n;
            this.options.disabled ||
              this.greedyChild ||
              !this.visible ||
              ((n =
                !(i = Y.ui.intersect(s, this, this.options.tolerance, o)) &&
                this.isover
                  ? "isout"
                  : i && !this.isover
                    ? "isover"
                    : null) &&
                (this.options.greedy &&
                  ((t = this.options.scope),
                  (i = this.element
                    .parents(":data(ui-droppable)")
                    .filter(function () {
                      return Y(this).droppable("instance").options.scope === t;
                    })).length &&
                    ((e = Y(i[0]).droppable("instance")).greedyChild =
                      "isover" === n)),
                e &&
                  "isover" === n &&
                  ((e.isover = !1), (e.isout = !0), e._out.call(e, o)),
                (this[n] = !0),
                (this["isout" === n ? "isover" : "isout"] = !1),
                this["isover" === n ? "_over" : "_out"].call(this, o),
                e &&
                  "isout" === n &&
                  ((e.isout = !1), (e.isover = !0), e._over.call(e, o))));
          }));
      },
      dragStop: function (e, t) {
        (e.element.parentsUntil("body").off("scroll.droppable"),
          e.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(e, t));
      },
    }) !== Y.uiBackCompat &&
      Y.widget("ui.droppable", Y.ui.droppable, {
        options: { hoverClass: !1, activeClass: !1 },
        _addActiveClass: function () {
          (this._super(),
            this.options.activeClass &&
              this.element.addClass(this.options.activeClass));
        },
        _removeActiveClass: function () {
          (this._super(),
            this.options.activeClass &&
              this.element.removeClass(this.options.activeClass));
        },
        _addHoverClass: function () {
          (this._super(),
            this.options.hoverClass &&
              this.element.addClass(this.options.hoverClass));
        },
        _removeHoverClass: function () {
          (this._super(),
            this.options.hoverClass &&
              this.element.removeClass(this.options.hoverClass));
        },
      }));
  (Y.ui.droppable,
    Y.widget("ui.progressbar", {
      version: "1.13.0",
      options: {
        classes: {
          "ui-progressbar": "ui-corner-all",
          "ui-progressbar-value": "ui-corner-left",
          "ui-progressbar-complete": "ui-corner-right",
        },
        max: 100,
        value: 0,
        change: null,
        complete: null,
      },
      min: 0,
      _create: function () {
        ((this.oldValue = this.options.value = this._constrainedValue()),
          this.element.attr({ role: "progressbar", "aria-valuemin": this.min }),
          this._addClass("ui-progressbar", "ui-widget ui-widget-content"),
          (this.valueDiv = Y("<div>").appendTo(this.element)),
          this._addClass(
            this.valueDiv,
            "ui-progressbar-value",
            "ui-widget-header",
          ),
          this._refreshValue());
      },
      _destroy: function () {
        (this.element.removeAttr(
          "role aria-valuemin aria-valuemax aria-valuenow",
        ),
          this.valueDiv.remove());
      },
      value: function (e) {
        if (void 0 === e) return this.options.value;
        ((this.options.value = this._constrainedValue(e)),
          this._refreshValue());
      },
      _constrainedValue: function (e) {
        return (
          void 0 === e && (e = this.options.value),
          (this.indeterminate = !1 === e),
          "number" != typeof e && (e = 0),
          !this.indeterminate &&
            Math.min(this.options.max, Math.max(this.min, e))
        );
      },
      _setOptions: function (e) {
        var t = e.value;
        (delete e.value,
          this._super(e),
          (this.options.value = this._constrainedValue(t)),
          this._refreshValue());
      },
      _setOption: function (e, t) {
        ("max" === e && (t = Math.max(this.min, t)), this._super(e, t));
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", e),
          this._toggleClass(null, "ui-state-disabled", !!e));
      },
      _percentage: function () {
        return this.indeterminate
          ? 100
          : (100 * (this.options.value - this.min)) /
              (this.options.max - this.min);
      },
      _refreshValue: function () {
        var e = this.options.value,
          t = this._percentage();
        (this.valueDiv
          .toggle(this.indeterminate || e > this.min)
          .width(t.toFixed(0) + "%"),
          this._toggleClass(
            this.valueDiv,
            "ui-progressbar-complete",
            null,
            e === this.options.max,
          )._toggleClass(
            "ui-progressbar-indeterminate",
            null,
            this.indeterminate,
          ),
          this.indeterminate
            ? (this.element.removeAttr("aria-valuenow"),
              this.overlayDiv ||
                ((this.overlayDiv = Y("<div>").appendTo(this.valueDiv)),
                this._addClass(this.overlayDiv, "ui-progressbar-overlay")))
            : (this.element.attr({
                "aria-valuemax": this.options.max,
                "aria-valuenow": e,
              }),
              this.overlayDiv &&
                (this.overlayDiv.remove(), (this.overlayDiv = null))),
          this.oldValue !== e && ((this.oldValue = e), this._trigger("change")),
          e === this.options.max && this._trigger("complete"));
      },
    }),
    Y.widget("ui.selectable", Y.ui.mouse, {
      version: "1.13.0",
      options: {
        appendTo: "body",
        autoRefresh: !0,
        distance: 0,
        filter: "*",
        tolerance: "touch",
        selected: null,
        selecting: null,
        start: null,
        stop: null,
        unselected: null,
        unselecting: null,
      },
      _create: function () {
        var i = this;
        (this._addClass("ui-selectable"),
          (this.dragged = !1),
          (this.refresh = function () {
            ((i.elementPos = Y(i.element[0]).offset()),
              (i.selectees = Y(i.options.filter, i.element[0])),
              i._addClass(i.selectees, "ui-selectee"),
              i.selectees.each(function () {
                var e = Y(this),
                  t = e.offset(),
                  t = {
                    left: t.left - i.elementPos.left,
                    top: t.top - i.elementPos.top,
                  };
                Y.data(this, "selectable-item", {
                  element: this,
                  $element: e,
                  left: t.left,
                  top: t.top,
                  right: t.left + e.outerWidth(),
                  bottom: t.top + e.outerHeight(),
                  startselected: !1,
                  selected: e.hasClass("ui-selected"),
                  selecting: e.hasClass("ui-selecting"),
                  unselecting: e.hasClass("ui-unselecting"),
                });
              }));
          }),
          this.refresh(),
          this._mouseInit(),
          (this.helper = Y("<div>")),
          this._addClass(this.helper, "ui-selectable-helper"));
      },
      _destroy: function () {
        (this.selectees.removeData("selectable-item"), this._mouseDestroy());
      },
      _mouseStart: function (i) {
        var n = this,
          e = this.options;
        ((this.opos = [i.pageX, i.pageY]),
          (this.elementPos = Y(this.element[0]).offset()),
          this.options.disabled ||
            ((this.selectees = Y(e.filter, this.element[0])),
            this._trigger("start", i),
            Y(e.appendTo).append(this.helper),
            this.helper.css({
              left: i.pageX,
              top: i.pageY,
              width: 0,
              height: 0,
            }),
            e.autoRefresh && this.refresh(),
            this.selectees.filter(".ui-selected").each(function () {
              var e = Y.data(this, "selectable-item");
              ((e.startselected = !0),
                i.metaKey ||
                  i.ctrlKey ||
                  (n._removeClass(e.$element, "ui-selected"),
                  (e.selected = !1),
                  n._addClass(e.$element, "ui-unselecting"),
                  (e.unselecting = !0),
                  n._trigger("unselecting", i, { unselecting: e.element })));
            }),
            Y(i.target)
              .parents()
              .addBack()
              .each(function () {
                var e,
                  t = Y.data(this, "selectable-item");
                if (t)
                  return (
                    (e =
                      (!i.metaKey && !i.ctrlKey) ||
                      !t.$element.hasClass("ui-selected")),
                    n
                      ._removeClass(
                        t.$element,
                        e ? "ui-unselecting" : "ui-selected",
                      )
                      ._addClass(
                        t.$element,
                        e ? "ui-selecting" : "ui-unselecting",
                      ),
                    (t.unselecting = !e),
                    (t.selecting = e),
                    (t.selected = e)
                      ? n._trigger("selecting", i, { selecting: t.element })
                      : n._trigger("unselecting", i, {
                          unselecting: t.element,
                        }),
                    !1
                  );
              })));
      },
      _mouseDrag: function (n) {
        if (((this.dragged = !0), !this.options.disabled)) {
          var e,
            s = this,
            o = this.options,
            r = this.opos[0],
            a = this.opos[1],
            l = n.pageX,
            h = n.pageY;
          return (
            l < r && ((e = l), (l = r), (r = e)),
            h < a && ((e = h), (h = a), (a = e)),
            this.helper.css({ left: r, top: a, width: l - r, height: h - a }),
            this.selectees.each(function () {
              var e = Y.data(this, "selectable-item"),
                t = !1,
                i = {};
              e &&
                e.element !== s.element[0] &&
                ((i.left = e.left + s.elementPos.left),
                (i.right = e.right + s.elementPos.left),
                (i.top = e.top + s.elementPos.top),
                (i.bottom = e.bottom + s.elementPos.top),
                "touch" === o.tolerance
                  ? (t = !(
                      i.left > l ||
                      i.right < r ||
                      i.top > h ||
                      i.bottom < a
                    ))
                  : "fit" === o.tolerance &&
                    (t =
                      i.left > r && i.right < l && i.top > a && i.bottom < h),
                t
                  ? (e.selected &&
                      (s._removeClass(e.$element, "ui-selected"),
                      (e.selected = !1)),
                    e.unselecting &&
                      (s._removeClass(e.$element, "ui-unselecting"),
                      (e.unselecting = !1)),
                    e.selecting ||
                      (s._addClass(e.$element, "ui-selecting"),
                      (e.selecting = !0),
                      s._trigger("selecting", n, { selecting: e.element })))
                  : (e.selecting &&
                      ((n.metaKey || n.ctrlKey) && e.startselected
                        ? (s._removeClass(e.$element, "ui-selecting"),
                          (e.selecting = !1),
                          s._addClass(e.$element, "ui-selected"),
                          (e.selected = !0))
                        : (s._removeClass(e.$element, "ui-selecting"),
                          (e.selecting = !1),
                          e.startselected &&
                            (s._addClass(e.$element, "ui-unselecting"),
                            (e.unselecting = !0)),
                          s._trigger("unselecting", n, {
                            unselecting: e.element,
                          }))),
                    e.selected &&
                      (n.metaKey ||
                        n.ctrlKey ||
                        e.startselected ||
                        (s._removeClass(e.$element, "ui-selected"),
                        (e.selected = !1),
                        s._addClass(e.$element, "ui-unselecting"),
                        (e.unselecting = !0),
                        s._trigger("unselecting", n, {
                          unselecting: e.element,
                        })))));
            }),
            !1
          );
        }
      },
      _mouseStop: function (t) {
        var i = this;
        return (
          (this.dragged = !1),
          Y(".ui-unselecting", this.element[0]).each(function () {
            var e = Y.data(this, "selectable-item");
            (i._removeClass(e.$element, "ui-unselecting"),
              (e.unselecting = !1),
              (e.startselected = !1),
              i._trigger("unselected", t, { unselected: e.element }));
          }),
          Y(".ui-selecting", this.element[0]).each(function () {
            var e = Y.data(this, "selectable-item");
            (i
              ._removeClass(e.$element, "ui-selecting")
              ._addClass(e.$element, "ui-selected"),
              (e.selecting = !1),
              (e.selected = !0),
              (e.startselected = !0),
              i._trigger("selected", t, { selected: e.element }));
          }),
          this._trigger("stop", t),
          this.helper.remove(),
          !1
        );
      },
    }),
    Y.widget("ui.selectmenu", [
      Y.ui.formResetMixin,
      {
        version: "1.13.0",
        defaultElement: "<select>",
        options: {
          appendTo: null,
          classes: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
          disabled: null,
          icons: { button: "ui-icon-triangle-1-s" },
          position: { my: "left top", at: "left bottom", collision: "none" },
          width: !1,
          change: null,
          close: null,
          focus: null,
          open: null,
          select: null,
        },
        _create: function () {
          var e = this.element.uniqueId().attr("id");
          ((this.ids = {
            element: e,
            button: e + "-button",
            menu: e + "-menu",
          }),
            this._drawButton(),
            this._drawMenu(),
            this._bindFormResetHandler(),
            (this._rendered = !1),
            (this.menuItems = Y()));
        },
        _drawButton: function () {
          var e,
            t = this,
            i = this._parseOption(
              this.element.find("option:selected"),
              this.element[0].selectedIndex,
            );
          ((this.labels = this.element.labels().attr("for", this.ids.button)),
            this._on(this.labels, {
              click: function (e) {
                (this.button.trigger("focus"), e.preventDefault());
              },
            }),
            this.element.hide(),
            (this.button = Y("<span>", {
              tabindex: this.options.disabled ? -1 : 0,
              id: this.ids.button,
              role: "combobox",
              "aria-expanded": "false",
              "aria-autocomplete": "list",
              "aria-owns": this.ids.menu,
              "aria-haspopup": "true",
              title: this.element.attr("title"),
            }).insertAfter(this.element)),
            this._addClass(
              this.button,
              "ui-selectmenu-button ui-selectmenu-button-closed",
              "ui-button ui-widget",
            ),
            (e = Y("<span>").appendTo(this.button)),
            this._addClass(
              e,
              "ui-selectmenu-icon",
              "ui-icon " + this.options.icons.button,
            ),
            (this.buttonItem = this._renderButtonItem(i).appendTo(this.button)),
            !1 !== this.options.width && this._resizeButton(),
            this._on(this.button, this._buttonEvents),
            this.button.one("focusin", function () {
              t._rendered || t._refreshMenu();
            }));
        },
        _drawMenu: function () {
          var i = this;
          ((this.menu = Y("<ul>", {
            "aria-hidden": "true",
            "aria-labelledby": this.ids.button,
            id: this.ids.menu,
          })),
            (this.menuWrap = Y("<div>").append(this.menu)),
            this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"),
            this.menuWrap.appendTo(this._appendTo()),
            (this.menuInstance = this.menu
              .menu({
                classes: { "ui-menu": "ui-corner-bottom" },
                role: "listbox",
                select: function (e, t) {
                  (e.preventDefault(),
                    i._setSelection(),
                    i._select(t.item.data("ui-selectmenu-item"), e));
                },
                focus: function (e, t) {
                  t = t.item.data("ui-selectmenu-item");
                  (null != i.focusIndex &&
                    t.index !== i.focusIndex &&
                    (i._trigger("focus", e, { item: t }),
                    i.isOpen || i._select(t, e)),
                    (i.focusIndex = t.index),
                    i.button.attr(
                      "aria-activedescendant",
                      i.menuItems.eq(t.index).attr("id"),
                    ));
                },
              })
              .menu("instance")),
            this.menuInstance._off(this.menu, "mouseleave"),
            (this.menuInstance._closeOnDocumentClick = function () {
              return !1;
            }),
            (this.menuInstance._isDivider = function () {
              return !1;
            }));
        },
        refresh: function () {
          (this._refreshMenu(),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(
                this._getSelectedItem().data("ui-selectmenu-item") || {},
              )),
            ),
            null === this.options.width && this._resizeButton());
        },
        _refreshMenu: function () {
          var e = this.element.find("option");
          (this.menu.empty(),
            this._parseOptions(e),
            this._renderMenu(this.menu, this.items),
            this.menuInstance.refresh(),
            (this.menuItems = this.menu
              .find("li")
              .not(".ui-selectmenu-optgroup")
              .find(".ui-menu-item-wrapper")),
            (this._rendered = !0),
            e.length &&
              ((e = this._getSelectedItem()),
              this.menuInstance.focus(null, e),
              this._setAria(e.data("ui-selectmenu-item")),
              this._setOption("disabled", this.element.prop("disabled"))));
        },
        open: function (e) {
          this.options.disabled ||
            (this._rendered
              ? (this._removeClass(
                  this.menu.find(".ui-state-active"),
                  null,
                  "ui-state-active",
                ),
                this.menuInstance.focus(null, this._getSelectedItem()))
              : this._refreshMenu(),
            this.menuItems.length &&
              ((this.isOpen = !0),
              this._toggleAttr(),
              this._resizeMenu(),
              this._position(),
              this._on(this.document, this._documentClick),
              this._trigger("open", e)));
        },
        _position: function () {
          this.menuWrap.position(
            Y.extend({ of: this.button }, this.options.position),
          );
        },
        close: function (e) {
          this.isOpen &&
            ((this.isOpen = !1),
            this._toggleAttr(),
            (this.range = null),
            this._off(this.document),
            this._trigger("close", e));
        },
        widget: function () {
          return this.button;
        },
        menuWidget: function () {
          return this.menu;
        },
        _renderButtonItem: function (e) {
          var t = Y("<span>");
          return (
            this._setText(t, e.label),
            this._addClass(t, "ui-selectmenu-text"),
            t
          );
        },
        _renderMenu: function (n, e) {
          var s = this,
            o = "";
          Y.each(e, function (e, t) {
            var i;
            (t.optgroup !== o &&
              ((i = Y("<li>", { text: t.optgroup })),
              s._addClass(
                i,
                "ui-selectmenu-optgroup",
                "ui-menu-divider" +
                  (t.element.parent("optgroup").prop("disabled")
                    ? " ui-state-disabled"
                    : ""),
              ),
              i.appendTo(n),
              (o = t.optgroup)),
              s._renderItemData(n, t));
          });
        },
        _renderItemData: function (e, t) {
          return this._renderItem(e, t).data("ui-selectmenu-item", t);
        },
        _renderItem: function (e, t) {
          var i = Y("<li>"),
            n = Y("<div>", { title: t.element.attr("title") });
          return (
            t.disabled && this._addClass(i, null, "ui-state-disabled"),
            this._setText(n, t.label),
            i.append(n).appendTo(e)
          );
        },
        _setText: function (e, t) {
          t ? e.text(t) : e.html("&#160;");
        },
        _move: function (e, t) {
          var i,
            n = ".ui-menu-item";
          (this.isOpen
            ? (i = this.menuItems.eq(this.focusIndex).parent("li"))
            : ((i = this.menuItems
                .eq(this.element[0].selectedIndex)
                .parent("li")),
              (n += ":not(.ui-state-disabled)")),
            (n =
              "first" === e || "last" === e
                ? i["first" === e ? "prevAll" : "nextAll"](n).eq(-1)
                : i[e + "All"](n).eq(0)).length &&
              this.menuInstance.focus(t, n));
        },
        _getSelectedItem: function () {
          return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
        },
        _toggle: function (e) {
          this[this.isOpen ? "close" : "open"](e);
        },
        _setSelection: function () {
          var e;
          this.range &&
            (window.getSelection
              ? ((e = window.getSelection()).removeAllRanges(),
                e.addRange(this.range))
              : this.range.select(),
            this.button.focus());
        },
        _documentClick: {
          mousedown: function (e) {
            this.isOpen &&
              (Y(e.target).closest(
                ".ui-selectmenu-menu, #" + Y.escapeSelector(this.ids.button),
              ).length ||
                this.close(e));
          },
        },
        _buttonEvents: {
          mousedown: function () {
            var e;
            window.getSelection
              ? (e = window.getSelection()).rangeCount &&
                (this.range = e.getRangeAt(0))
              : (this.range = document.selection.createRange());
          },
          click: function (e) {
            (this._setSelection(), this._toggle(e));
          },
          keydown: function (e) {
            var t = !0;
            switch (e.keyCode) {
              case Y.ui.keyCode.TAB:
              case Y.ui.keyCode.ESCAPE:
                (this.close(e), (t = !1));
                break;
              case Y.ui.keyCode.ENTER:
                this.isOpen && this._selectFocusedItem(e);
                break;
              case Y.ui.keyCode.UP:
                e.altKey ? this._toggle(e) : this._move("prev", e);
                break;
              case Y.ui.keyCode.DOWN:
                e.altKey ? this._toggle(e) : this._move("next", e);
                break;
              case Y.ui.keyCode.SPACE:
                this.isOpen ? this._selectFocusedItem(e) : this._toggle(e);
                break;
              case Y.ui.keyCode.LEFT:
                this._move("prev", e);
                break;
              case Y.ui.keyCode.RIGHT:
                this._move("next", e);
                break;
              case Y.ui.keyCode.HOME:
              case Y.ui.keyCode.PAGE_UP:
                this._move("first", e);
                break;
              case Y.ui.keyCode.END:
              case Y.ui.keyCode.PAGE_DOWN:
                this._move("last", e);
                break;
              default:
                (this.menu.trigger(e), (t = !1));
            }
            t && e.preventDefault();
          },
        },
        _selectFocusedItem: function (e) {
          var t = this.menuItems.eq(this.focusIndex).parent("li");
          t.hasClass("ui-state-disabled") ||
            this._select(t.data("ui-selectmenu-item"), e);
        },
        _select: function (e, t) {
          var i = this.element[0].selectedIndex;
          ((this.element[0].selectedIndex = e.index),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(e)),
            ),
            this._setAria(e),
            this._trigger("select", t, { item: e }),
            e.index !== i && this._trigger("change", t, { item: e }),
            this.close(t));
        },
        _setAria: function (e) {
          e = this.menuItems.eq(e.index).attr("id");
          (this.button.attr({
            "aria-labelledby": e,
            "aria-activedescendant": e,
          }),
            this.menu.attr("aria-activedescendant", e));
        },
        _setOption: function (e, t) {
          var i;
          ("icons" === e &&
            ((i = this.button.find("span.ui-icon")),
            this._removeClass(i, null, this.options.icons.button)._addClass(
              i,
              null,
              t.button,
            )),
            this._super(e, t),
            "appendTo" === e && this.menuWrap.appendTo(this._appendTo()),
            "width" === e && this._resizeButton());
        },
        _setOptionDisabled: function (e) {
          (this._super(e),
            this.menuInstance.option("disabled", e),
            this.button.attr("aria-disabled", e),
            this._toggleClass(this.button, null, "ui-state-disabled", e),
            this.element.prop("disabled", e),
            e
              ? (this.button.attr("tabindex", -1), this.close())
              : this.button.attr("tabindex", 0));
        },
        _appendTo: function () {
          var e = this.options.appendTo;
          return (e = !(e =
            !(e =
              e &&
              (e.jquery || e.nodeType ? Y(e) : this.document.find(e).eq(0))) ||
            !e[0]
              ? this.element.closest(".ui-front, dialog")
              : e).length
            ? this.document[0].body
            : e);
        },
        _toggleAttr: function () {
          (this.button.attr("aria-expanded", this.isOpen),
            this._removeClass(
              this.button,
              "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"),
            )
              ._addClass(
                this.button,
                "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"),
              )
              ._toggleClass(
                this.menuWrap,
                "ui-selectmenu-open",
                null,
                this.isOpen,
              ),
            this.menu.attr("aria-hidden", !this.isOpen));
        },
        _resizeButton: function () {
          var e = this.options.width;
          !1 !== e
            ? (null === e &&
                ((e = this.element.show().outerWidth()), this.element.hide()),
              this.button.outerWidth(e))
            : this.button.css("width", "");
        },
        _resizeMenu: function () {
          this.menu.outerWidth(
            Math.max(
              this.button.outerWidth(),
              this.menu.width("").outerWidth() + 1,
            ),
          );
        },
        _getCreateOptions: function () {
          var e = this._super();
          return ((e.disabled = this.element.prop("disabled")), e);
        },
        _parseOptions: function (e) {
          var i = this,
            n = [];
          (e.each(function (e, t) {
            t.hidden || n.push(i._parseOption(Y(t), e));
          }),
            (this.items = n));
        },
        _parseOption: function (e, t) {
          var i = e.parent("optgroup");
          return {
            element: e,
            index: t,
            value: e.val(),
            label: e.text(),
            optgroup: i.attr("label") || "",
            disabled: i.prop("disabled") || e.prop("disabled"),
          };
        },
        _destroy: function () {
          (this._unbindFormResetHandler(),
            this.menuWrap.remove(),
            this.button.remove(),
            this.element.show(),
            this.element.removeUniqueId(),
            this.labels.attr("for", this.ids.element));
        },
      },
    ]),
    Y.widget("ui.slider", Y.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "slide",
      options: {
        animate: !1,
        classes: {
          "ui-slider": "ui-corner-all",
          "ui-slider-handle": "ui-corner-all",
          "ui-slider-range": "ui-corner-all ui-widget-header",
        },
        distance: 0,
        max: 100,
        min: 0,
        orientation: "horizontal",
        range: !1,
        step: 1,
        value: 0,
        values: null,
        change: null,
        slide: null,
        start: null,
        stop: null,
      },
      numPages: 5,
      _create: function () {
        ((this._keySliding = !1),
          (this._mouseSliding = !1),
          (this._animateOff = !0),
          (this._handleIndex = null),
          this._detectOrientation(),
          this._mouseInit(),
          this._calculateNewMax(),
          this._addClass(
            "ui-slider ui-slider-" + this.orientation,
            "ui-widget ui-widget-content",
          ),
          this._refresh(),
          (this._animateOff = !1));
      },
      _refresh: function () {
        (this._createRange(),
          this._createHandles(),
          this._setupEvents(),
          this._refreshValue());
      },
      _createHandles: function () {
        var e,
          t = this.options,
          i = this.element.find(".ui-slider-handle"),
          n = [],
          s = (t.values && t.values.length) || 1;
        for (
          i.length > s && (i.slice(s).remove(), (i = i.slice(0, s))),
            e = i.length;
          e < s;
          e++
        )
          n.push("<span tabindex='0'></span>");
        ((this.handles = i.add(Y(n.join("")).appendTo(this.element))),
          this._addClass(this.handles, "ui-slider-handle", "ui-state-default"),
          (this.handle = this.handles.eq(0)),
          this.handles.each(function (e) {
            Y(this).data("ui-slider-handle-index", e).attr("tabIndex", 0);
          }));
      },
      _createRange: function () {
        var e = this.options;
        e.range
          ? (!0 === e.range &&
              (e.values
                ? e.values.length && 2 !== e.values.length
                  ? (e.values = [e.values[0], e.values[0]])
                  : Array.isArray(e.values) && (e.values = e.values.slice(0))
                : (e.values = [this._valueMin(), this._valueMin()])),
            this.range && this.range.length
              ? (this._removeClass(
                  this.range,
                  "ui-slider-range-min ui-slider-range-max",
                ),
                this.range.css({ left: "", bottom: "" }))
              : ((this.range = Y("<div>").appendTo(this.element)),
                this._addClass(this.range, "ui-slider-range")),
            ("min" !== e.range && "max" !== e.range) ||
              this._addClass(this.range, "ui-slider-range-" + e.range))
          : (this.range && this.range.remove(), (this.range = null));
      },
      _setupEvents: function () {
        (this._off(this.handles),
          this._on(this.handles, this._handleEvents),
          this._hoverable(this.handles),
          this._focusable(this.handles));
      },
      _destroy: function () {
        (this.handles.remove(),
          this.range && this.range.remove(),
          this._mouseDestroy());
      },
      _mouseCapture: function (e) {
        var i,
          n,
          s,
          o,
          t,
          r,
          a = this,
          l = this.options;
        return (
          !l.disabled &&
          ((this.elementSize = {
            width: this.element.outerWidth(),
            height: this.element.outerHeight(),
          }),
          (this.elementOffset = this.element.offset()),
          (r = { x: e.pageX, y: e.pageY }),
          (i = this._normValueFromMouse(r)),
          (n = this._valueMax() - this._valueMin() + 1),
          this.handles.each(function (e) {
            var t = Math.abs(i - a.values(e));
            (t < n ||
              (n === t &&
                (e === a._lastChangedValue || a.values(e) === l.min))) &&
              ((n = t), (s = Y(this)), (o = e));
          }),
          !1 !== this._start(e, o) &&
            ((this._mouseSliding = !0),
            (this._handleIndex = o),
            this._addClass(s, null, "ui-state-active"),
            s.trigger("focus"),
            (t = s.offset()),
            (r = !Y(e.target).parents().addBack().is(".ui-slider-handle")),
            (this._clickOffset = r
              ? { left: 0, top: 0 }
              : {
                  left: e.pageX - t.left - s.width() / 2,
                  top:
                    e.pageY -
                    t.top -
                    s.height() / 2 -
                    (parseInt(s.css("borderTopWidth"), 10) || 0) -
                    (parseInt(s.css("borderBottomWidth"), 10) || 0) +
                    (parseInt(s.css("marginTop"), 10) || 0),
                }),
            this.handles.hasClass("ui-state-hover") || this._slide(e, o, i),
            (this._animateOff = !0)))
        );
      },
      _mouseStart: function () {
        return !0;
      },
      _mouseDrag: function (e) {
        var t = { x: e.pageX, y: e.pageY },
          t = this._normValueFromMouse(t);
        return (this._slide(e, this._handleIndex, t), !1);
      },
      _mouseStop: function (e) {
        return (
          this._removeClass(this.handles, null, "ui-state-active"),
          (this._mouseSliding = !1),
          this._stop(e, this._handleIndex),
          this._change(e, this._handleIndex),
          (this._handleIndex = null),
          (this._clickOffset = null),
          (this._animateOff = !1)
        );
      },
      _detectOrientation: function () {
        this.orientation =
          "vertical" === this.options.orientation ? "vertical" : "horizontal";
      },
      _normValueFromMouse: function (e) {
        var t,
          e =
            "horizontal" === this.orientation
              ? ((t = this.elementSize.width),
                e.x -
                  this.elementOffset.left -
                  (this._clickOffset ? this._clickOffset.left : 0))
              : ((t = this.elementSize.height),
                e.y -
                  this.elementOffset.top -
                  (this._clickOffset ? this._clickOffset.top : 0)),
          e = e / t;
        return (
          (e = 1 < e ? 1 : e) < 0 && (e = 0),
          "vertical" === this.orientation && (e = 1 - e),
          (t = this._valueMax() - this._valueMin()),
          (t = this._valueMin() + e * t),
          this._trimAlignValue(t)
        );
      },
      _uiHash: function (e, t, i) {
        var n = {
          handle: this.handles[e],
          handleIndex: e,
          value: void 0 !== t ? t : this.value(),
        };
        return (
          this._hasMultipleValues() &&
            ((n.value = void 0 !== t ? t : this.values(e)),
            (n.values = i || this.values())),
          n
        );
      },
      _hasMultipleValues: function () {
        return this.options.values && this.options.values.length;
      },
      _start: function (e, t) {
        return this._trigger("start", e, this._uiHash(t));
      },
      _slide: function (e, t, i) {
        var n,
          s = this.value(),
          o = this.values();
        (this._hasMultipleValues() &&
          ((n = this.values(t ? 0 : 1)),
          (s = this.values(t)),
          2 === this.options.values.length &&
            !0 === this.options.range &&
            (i = 0 === t ? Math.min(n, i) : Math.max(n, i)),
          (o[t] = i)),
          i !== s &&
            !1 !== this._trigger("slide", e, this._uiHash(t, i, o)) &&
            (this._hasMultipleValues() ? this.values(t, i) : this.value(i)));
      },
      _stop: function (e, t) {
        this._trigger("stop", e, this._uiHash(t));
      },
      _change: function (e, t) {
        this._keySliding ||
          this._mouseSliding ||
          ((this._lastChangedValue = t),
          this._trigger("change", e, this._uiHash(t)));
      },
      value: function (e) {
        return arguments.length
          ? ((this.options.value = this._trimAlignValue(e)),
            this._refreshValue(),
            void this._change(null, 0))
          : this._value();
      },
      values: function (e, t) {
        var i, n, s;
        if (1 < arguments.length)
          return (
            (this.options.values[e] = this._trimAlignValue(t)),
            this._refreshValue(),
            void this._change(null, e)
          );
        if (!arguments.length) return this._values();
        if (!Array.isArray(e))
          return this._hasMultipleValues() ? this._values(e) : this.value();
        for (i = this.options.values, n = e, s = 0; s < i.length; s += 1)
          ((i[s] = this._trimAlignValue(n[s])), this._change(null, s));
        this._refreshValue();
      },
      _setOption: function (e, t) {
        var i,
          n = 0;
        switch (
          ("range" === e &&
            !0 === this.options.range &&
            ("min" === t
              ? ((this.options.value = this._values(0)),
                (this.options.values = null))
              : "max" === t &&
                ((this.options.value = this._values(
                  this.options.values.length - 1,
                )),
                (this.options.values = null))),
          Array.isArray(this.options.values) &&
            (n = this.options.values.length),
          this._super(e, t),
          e)
        ) {
          case "orientation":
            (this._detectOrientation(),
              this._removeClass(
                "ui-slider-horizontal ui-slider-vertical",
              )._addClass("ui-slider-" + this.orientation),
              this._refreshValue(),
              this.options.range && this._refreshRange(t),
              this.handles.css("horizontal" === t ? "bottom" : "left", ""));
            break;
          case "value":
            ((this._animateOff = !0),
              this._refreshValue(),
              this._change(null, 0),
              (this._animateOff = !1));
            break;
          case "values":
            for (
              this._animateOff = !0, this._refreshValue(), i = n - 1;
              0 <= i;
              i--
            )
              this._change(null, i);
            this._animateOff = !1;
            break;
          case "step":
          case "min":
          case "max":
            ((this._animateOff = !0),
              this._calculateNewMax(),
              this._refreshValue(),
              (this._animateOff = !1));
            break;
          case "range":
            ((this._animateOff = !0), this._refresh(), (this._animateOff = !1));
        }
      },
      _setOptionDisabled: function (e) {
        (this._super(e), this._toggleClass(null, "ui-state-disabled", !!e));
      },
      _value: function () {
        var e = this.options.value;
        return (e = this._trimAlignValue(e));
      },
      _values: function (e) {
        var t, i;
        if (arguments.length)
          return ((e = this.options.values[e]), this._trimAlignValue(e));
        if (this._hasMultipleValues()) {
          for (t = this.options.values.slice(), i = 0; i < t.length; i += 1)
            t[i] = this._trimAlignValue(t[i]);
          return t;
        }
        return [];
      },
      _trimAlignValue: function (e) {
        if (e <= this._valueMin()) return this._valueMin();
        if (e >= this._valueMax()) return this._valueMax();
        var t = 0 < this.options.step ? this.options.step : 1,
          i = (e - this._valueMin()) % t,
          e = e - i;
        return (
          2 * Math.abs(i) >= t && (e += 0 < i ? t : -t),
          parseFloat(e.toFixed(5))
        );
      },
      _calculateNewMax: function () {
        var e = this.options.max,
          t = this._valueMin(),
          i = this.options.step;
        ((e = Math.round((e - t) / i) * i + t) > this.options.max && (e -= i),
          (this.max = parseFloat(e.toFixed(this._precision()))));
      },
      _precision: function () {
        var e = this._precisionOf(this.options.step);
        return (e =
          null !== this.options.min
            ? Math.max(e, this._precisionOf(this.options.min))
            : e);
      },
      _precisionOf: function (e) {
        var t = e.toString(),
          e = t.indexOf(".");
        return -1 === e ? 0 : t.length - e - 1;
      },
      _valueMin: function () {
        return this.options.min;
      },
      _valueMax: function () {
        return this.max;
      },
      _refreshRange: function (e) {
        ("vertical" === e && this.range.css({ width: "", left: "" }),
          "horizontal" === e && this.range.css({ height: "", bottom: "" }));
      },
      _refreshValue: function () {
        var t,
          i,
          e,
          n,
          s,
          o = this.options.range,
          r = this.options,
          a = this,
          l = !this._animateOff && r.animate,
          h = {};
        this._hasMultipleValues()
          ? this.handles.each(function (e) {
              ((i =
                ((a.values(e) - a._valueMin()) /
                  (a._valueMax() - a._valueMin())) *
                100),
                (h["horizontal" === a.orientation ? "left" : "bottom"] =
                  i + "%"),
                Y(this).stop(1, 1)[l ? "animate" : "css"](h, r.animate),
                !0 === a.options.range &&
                  ("horizontal" === a.orientation
                    ? (0 === e &&
                        a.range
                          .stop(1, 1)
                          [l ? "animate" : "css"]({ left: i + "%" }, r.animate),
                      1 === e &&
                        a.range[l ? "animate" : "css"](
                          { width: i - t + "%" },
                          { queue: !1, duration: r.animate },
                        ))
                    : (0 === e &&
                        a.range
                          .stop(1, 1)
                          [
                            l ? "animate" : "css"
                          ]({ bottom: i + "%" }, r.animate),
                      1 === e &&
                        a.range[l ? "animate" : "css"](
                          { height: i - t + "%" },
                          { queue: !1, duration: r.animate },
                        ))),
                (t = i));
            })
          : ((e = this.value()),
            (n = this._valueMin()),
            (s = this._valueMax()),
            (i = s !== n ? ((e - n) / (s - n)) * 100 : 0),
            (h["horizontal" === this.orientation ? "left" : "bottom"] =
              i + "%"),
            this.handle.stop(1, 1)[l ? "animate" : "css"](h, r.animate),
            "min" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: i + "%" }, r.animate),
            "max" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: 100 - i + "%" }, r.animate),
            "min" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: i + "%" }, r.animate),
            "max" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: 100 - i + "%" }, r.animate));
      },
      _handleEvents: {
        keydown: function (e) {
          var t,
            i,
            n,
            s = Y(e.target).data("ui-slider-handle-index");
          switch (e.keyCode) {
            case Y.ui.keyCode.HOME:
            case Y.ui.keyCode.END:
            case Y.ui.keyCode.PAGE_UP:
            case Y.ui.keyCode.PAGE_DOWN:
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (
                (e.preventDefault(),
                !this._keySliding &&
                  ((this._keySliding = !0),
                  this._addClass(Y(e.target), null, "ui-state-active"),
                  !1 === this._start(e, s)))
              )
                return;
          }
          switch (
            ((n = this.options.step),
            (t = i = this._hasMultipleValues() ? this.values(s) : this.value()),
            e.keyCode)
          ) {
            case Y.ui.keyCode.HOME:
              i = this._valueMin();
              break;
            case Y.ui.keyCode.END:
              i = this._valueMax();
              break;
            case Y.ui.keyCode.PAGE_UP:
              i = this._trimAlignValue(
                t + (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Y.ui.keyCode.PAGE_DOWN:
              i = this._trimAlignValue(
                t - (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
              if (t === this._valueMax()) return;
              i = this._trimAlignValue(t + n);
              break;
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (t === this._valueMin()) return;
              i = this._trimAlignValue(t - n);
          }
          this._slide(e, s, i);
        },
        keyup: function (e) {
          var t = Y(e.target).data("ui-slider-handle-index");
          this._keySliding &&
            ((this._keySliding = !1),
            this._stop(e, t),
            this._change(e, t),
            this._removeClass(Y(e.target), null, "ui-state-active"));
        },
      },
    }),
    Y.widget("ui.sortable", Y.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "sort",
      ready: !1,
      options: {
        appendTo: "parent",
        axis: !1,
        connectWith: !1,
        containment: !1,
        cursor: "auto",
        cursorAt: !1,
        dropOnEmpty: !0,
        forcePlaceholderSize: !1,
        forceHelperSize: !1,
        grid: !1,
        handle: !1,
        helper: "original",
        items: "> *",
        opacity: !1,
        placeholder: !1,
        revert: !1,
        scroll: !0,
        scrollSensitivity: 20,
        scrollSpeed: 20,
        scope: "default",
        tolerance: "intersect",
        zIndex: 1e3,
        activate: null,
        beforeStop: null,
        change: null,
        deactivate: null,
        out: null,
        over: null,
        receive: null,
        remove: null,
        sort: null,
        start: null,
        stop: null,
        update: null,
      },
      _isOverAxis: function (e, t, i) {
        return t <= e && e < t + i;
      },
      _isFloating: function (e) {
        return (
          /left|right/.test(e.css("float")) ||
          /inline|table-cell/.test(e.css("display"))
        );
      },
      _create: function () {
        ((this.containerCache = {}),
          this._addClass("ui-sortable"),
          this.refresh(),
          (this.offset = this.element.offset()),
          this._mouseInit(),
          this._setHandleClassName(),
          (this.ready = !0));
      },
      _setOption: function (e, t) {
        (this._super(e, t), "handle" === e && this._setHandleClassName());
      },
      _setHandleClassName: function () {
        var e = this;
        (this._removeClass(
          this.element.find(".ui-sortable-handle"),
          "ui-sortable-handle",
        ),
          Y.each(this.items, function () {
            e._addClass(
              this.instance.options.handle
                ? this.item.find(this.instance.options.handle)
                : this.item,
              "ui-sortable-handle",
            );
          }));
      },
      _destroy: function () {
        this._mouseDestroy();
        for (var e = this.items.length - 1; 0 <= e; e--)
          this.items[e].item.removeData(this.widgetName + "-item");
        return this;
      },
      _mouseCapture: function (e, t) {
        var i = null,
          n = !1,
          s = this;
        return (
          !this.reverting &&
          !this.options.disabled &&
          "static" !== this.options.type &&
          (this._refreshItems(e),
          Y(e.target)
            .parents()
            .each(function () {
              if (Y.data(this, s.widgetName + "-item") === s)
                return ((i = Y(this)), !1);
            }),
          !!(i =
            Y.data(e.target, s.widgetName + "-item") === s ? Y(e.target) : i) &&
            !(
              this.options.handle &&
              !t &&
              (Y(this.options.handle, i)
                .find("*")
                .addBack()
                .each(function () {
                  this === e.target && (n = !0);
                }),
              !n)
            ) &&
            ((this.currentItem = i), this._removeCurrentsFromItems(), !0))
        );
      },
      _mouseStart: function (e, t, i) {
        var n,
          s,
          o = this.options;
        if (
          ((this.currentContainer = this).refreshPositions(),
          (this.appendTo = Y(
            "parent" !== o.appendTo ? o.appendTo : this.currentItem.parent(),
          )),
          (this.helper = this._createHelper(e)),
          this._cacheHelperProportions(),
          this._cacheMargins(),
          (this.offset = this.currentItem.offset()),
          (this.offset = {
            top: this.offset.top - this.margins.top,
            left: this.offset.left - this.margins.left,
          }),
          Y.extend(this.offset, {
            click: {
              left: e.pageX - this.offset.left,
              top: e.pageY - this.offset.top,
            },
            relative: this._getRelativeOffset(),
          }),
          this.helper.css("position", "absolute"),
          (this.cssPosition = this.helper.css("position")),
          o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt),
          (this.domPosition = {
            prev: this.currentItem.prev()[0],
            parent: this.currentItem.parent()[0],
          }),
          this.helper[0] !== this.currentItem[0] && this.currentItem.hide(),
          this._createPlaceholder(),
          (this.scrollParent = this.placeholder.scrollParent()),
          Y.extend(this.offset, { parent: this._getParentOffset() }),
          o.containment && this._setContainment(),
          o.cursor &&
            "auto" !== o.cursor &&
            ((s = this.document.find("body")),
            (this.storedCursor = s.css("cursor")),
            s.css("cursor", o.cursor),
            (this.storedStylesheet = Y(
              "<style>*{ cursor: " + o.cursor + " !important; }</style>",
            ).appendTo(s))),
          o.zIndex &&
            (this.helper.css("zIndex") &&
              (this._storedZIndex = this.helper.css("zIndex")),
            this.helper.css("zIndex", o.zIndex)),
          o.opacity &&
            (this.helper.css("opacity") &&
              (this._storedOpacity = this.helper.css("opacity")),
            this.helper.css("opacity", o.opacity)),
          this.scrollParent[0] !== this.document[0] &&
            "HTML" !== this.scrollParent[0].tagName &&
            (this.overflowOffset = this.scrollParent.offset()),
          this._trigger("start", e, this._uiHash()),
          this._preserveHelperProportions || this._cacheHelperProportions(),
          !i)
        )
          for (n = this.containers.length - 1; 0 <= n; n--)
            this.containers[n]._trigger("activate", e, this._uiHash(this));
        return (
          Y.ui.ddmanager && (Y.ui.ddmanager.current = this),
          Y.ui.ddmanager &&
            !o.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(this, e),
          (this.dragging = !0),
          this._addClass(this.helper, "ui-sortable-helper"),
          this.helper.parent().is(this.appendTo) ||
            (this.helper.detach().appendTo(this.appendTo),
            (this.offset.parent = this._getParentOffset())),
          (this.position = this.originalPosition = this._generatePosition(e)),
          (this.originalPageX = e.pageX),
          (this.originalPageY = e.pageY),
          (this.lastPositionAbs = this.positionAbs =
            this._convertPositionTo("absolute")),
          this._mouseDrag(e),
          !0
        );
      },
      _scroll: function (e) {
        var t = this.options,
          i = !1;
        return (
          this.scrollParent[0] !== this.document[0] &&
          "HTML" !== this.scrollParent[0].tagName
            ? (this.overflowOffset.top +
                this.scrollParent[0].offsetHeight -
                e.pageY <
              t.scrollSensitivity
                ? (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop + t.scrollSpeed)
                : e.pageY - this.overflowOffset.top < t.scrollSensitivity &&
                  (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop - t.scrollSpeed),
              this.overflowOffset.left +
                this.scrollParent[0].offsetWidth -
                e.pageX <
              t.scrollSensitivity
                ? (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft + t.scrollSpeed)
                : e.pageX - this.overflowOffset.left < t.scrollSensitivity &&
                  (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft - t.scrollSpeed))
            : (e.pageY - this.document.scrollTop() < t.scrollSensitivity
                ? (i = this.document.scrollTop(
                    this.document.scrollTop() - t.scrollSpeed,
                  ))
                : this.window.height() - (e.pageY - this.document.scrollTop()) <
                    t.scrollSensitivity &&
                  (i = this.document.scrollTop(
                    this.document.scrollTop() + t.scrollSpeed,
                  )),
              e.pageX - this.document.scrollLeft() < t.scrollSensitivity
                ? (i = this.document.scrollLeft(
                    this.document.scrollLeft() - t.scrollSpeed,
                  ))
                : this.window.width() - (e.pageX - this.document.scrollLeft()) <
                    t.scrollSensitivity &&
                  (i = this.document.scrollLeft(
                    this.document.scrollLeft() + t.scrollSpeed,
                  ))),
          i
        );
      },
      _mouseDrag: function (e) {
        var t,
          i,
          n,
          s,
          o = this.options;
        if (
          ((this.position = this._generatePosition(e)),
          (this.positionAbs = this._convertPositionTo("absolute")),
          (this.options.axis && "y" === this.options.axis) ||
            (this.helper[0].style.left = this.position.left + "px"),
          (this.options.axis && "x" === this.options.axis) ||
            (this.helper[0].style.top = this.position.top + "px"),
          this._contactContainers(e),
          null !== this.innermostContainer)
        )
          for (
            o.scroll &&
              !1 !== this._scroll(e) &&
              (this._refreshItemPositions(!0),
              Y.ui.ddmanager &&
                !o.dropBehaviour &&
                Y.ui.ddmanager.prepareOffsets(this, e)),
              this.dragDirection = {
                vertical: this._getDragVerticalDirection(),
                horizontal: this._getDragHorizontalDirection(),
              },
              t = this.items.length - 1;
            0 <= t;
            t--
          )
            if (
              ((n = (i = this.items[t]).item[0]),
              (s = this._intersectsWithPointer(i)) &&
                i.instance === this.currentContainer &&
                !(
                  n === this.currentItem[0] ||
                  this.placeholder[1 === s ? "next" : "prev"]()[0] === n ||
                  Y.contains(this.placeholder[0], n) ||
                  ("semi-dynamic" === this.options.type &&
                    Y.contains(this.element[0], n))
                ))
            ) {
              if (
                ((this.direction = 1 === s ? "down" : "up"),
                "pointer" !== this.options.tolerance &&
                  !this._intersectsWithSides(i))
              )
                break;
              (this._rearrange(e, i),
                this._trigger("change", e, this._uiHash()));
              break;
            }
        return (
          Y.ui.ddmanager && Y.ui.ddmanager.drag(this, e),
          this._trigger("sort", e, this._uiHash()),
          (this.lastPositionAbs = this.positionAbs),
          !1
        );
      },
      _mouseStop: function (e, t) {
        var i, n, s, o;
        if (e)
          return (
            Y.ui.ddmanager &&
              !this.options.dropBehaviour &&
              Y.ui.ddmanager.drop(this, e),
            this.options.revert
              ? ((n = (i = this).placeholder.offset()),
                (o = {}),
                ((s = this.options.axis) && "x" !== s) ||
                  (o.left =
                    n.left -
                    this.offset.parent.left -
                    this.margins.left +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollLeft)),
                (s && "y" !== s) ||
                  (o.top =
                    n.top -
                    this.offset.parent.top -
                    this.margins.top +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollTop)),
                (this.reverting = !0),
                Y(this.helper).animate(
                  o,
                  parseInt(this.options.revert, 10) || 500,
                  function () {
                    i._clear(e);
                  },
                ))
              : this._clear(e, t),
            !1
          );
      },
      cancel: function () {
        if (this.dragging) {
          (this._mouseUp(new Y.Event("mouseup", { target: null })),
            "original" === this.options.helper
              ? (this.currentItem.css(this._storedCSS),
                this._removeClass(this.currentItem, "ui-sortable-helper"))
              : this.currentItem.show());
          for (var e = this.containers.length - 1; 0 <= e; e--)
            (this.containers[e]._trigger(
              "deactivate",
              null,
              this._uiHash(this),
            ),
              this.containers[e].containerCache.over &&
                (this.containers[e]._trigger("out", null, this._uiHash(this)),
                (this.containers[e].containerCache.over = 0)));
        }
        return (
          this.placeholder &&
            (this.placeholder[0].parentNode &&
              this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
            "original" !== this.options.helper &&
              this.helper &&
              this.helper[0].parentNode &&
              this.helper.remove(),
            Y.extend(this, {
              helper: null,
              dragging: !1,
              reverting: !1,
              _noFinalSort: null,
            }),
            this.domPosition.prev
              ? Y(this.domPosition.prev).after(this.currentItem)
              : Y(this.domPosition.parent).prepend(this.currentItem)),
          this
        );
      },
      serialize: function (t) {
        var e = this._getItemsAsjQuery(t && t.connected),
          i = [];
        return (
          (t = t || {}),
          Y(e).each(function () {
            var e = (Y(t.item || this).attr(t.attribute || "id") || "").match(
              t.expression || /(.+)[\-=_](.+)/,
            );
            e &&
              i.push(
                (t.key || e[1] + "[]") +
                  "=" +
                  (t.key && t.expression ? e[1] : e[2]),
              );
          }),
          !i.length && t.key && i.push(t.key + "="),
          i.join("&")
        );
      },
      toArray: function (e) {
        var t = this._getItemsAsjQuery(e && e.connected),
          i = [];
        return (
          (e = e || {}),
          t.each(function () {
            i.push(Y(e.item || this).attr(e.attribute || "id") || "");
          }),
          i
        );
      },
      _intersectsWith: function (e) {
        var t = this.positionAbs.left,
          i = t + this.helperProportions.width,
          n = this.positionAbs.top,
          s = n + this.helperProportions.height,
          o = e.left,
          r = o + e.width,
          a = e.top,
          l = a + e.height,
          h = this.offset.click.top,
          c = this.offset.click.left,
          h = "x" === this.options.axis || (a < n + h && n + h < l),
          c = "y" === this.options.axis || (o < t + c && t + c < r);
        return "pointer" === this.options.tolerance ||
          this.options.forcePointerForContainers ||
          ("pointer" !== this.options.tolerance &&
            this.helperProportions[this.floating ? "width" : "height"] >
              e[this.floating ? "width" : "height"])
          ? h && c
          : o < t + this.helperProportions.width / 2 &&
              i - this.helperProportions.width / 2 < r &&
              a < n + this.helperProportions.height / 2 &&
              s - this.helperProportions.height / 2 < l;
      },
      _intersectsWithPointer: function (e) {
        var t =
            "x" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.top + this.offset.click.top,
              e.top,
              e.height,
            ),
          e =
            "y" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.left + this.offset.click.left,
              e.left,
              e.width,
            );
        return (
          !(!t || !e) &&
          ((t = this.dragDirection.vertical),
          (e = this.dragDirection.horizontal),
          this.floating
            ? "right" === e || "down" === t
              ? 2
              : 1
            : t && ("down" === t ? 2 : 1))
        );
      },
      _intersectsWithSides: function (e) {
        var t = this._isOverAxis(
            this.positionAbs.top + this.offset.click.top,
            e.top + e.height / 2,
            e.height,
          ),
          i = this._isOverAxis(
            this.positionAbs.left + this.offset.click.left,
            e.left + e.width / 2,
            e.width,
          ),
          n = this.dragDirection.vertical,
          e = this.dragDirection.horizontal;
        return this.floating && e
          ? ("right" === e && i) || ("left" === e && !i)
          : n && (("down" === n && t) || ("up" === n && !t));
      },
      _getDragVerticalDirection: function () {
        var e = this.positionAbs.top - this.lastPositionAbs.top;
        return 0 != e && (0 < e ? "down" : "up");
      },
      _getDragHorizontalDirection: function () {
        var e = this.positionAbs.left - this.lastPositionAbs.left;
        return 0 != e && (0 < e ? "right" : "left");
      },
      refresh: function (e) {
        return (
          this._refreshItems(e),
          this._setHandleClassName(),
          this.refreshPositions(),
          this
        );
      },
      _connectWith: function () {
        var e = this.options;
        return e.connectWith.constructor === String
          ? [e.connectWith]
          : e.connectWith;
      },
      _getItemsAsjQuery: function (e) {
        var t,
          i,
          n,
          s,
          o = [],
          r = [],
          a = this._connectWith();
        if (a && e)
          for (t = a.length - 1; 0 <= t; t--)
            for (i = (n = Y(a[t], this.document[0])).length - 1; 0 <= i; i--)
              (s = Y.data(n[i], this.widgetFullName)) &&
                s !== this &&
                !s.options.disabled &&
                r.push([
                  "function" == typeof s.options.items
                    ? s.options.items.call(s.element)
                    : Y(s.options.items, s.element)
                        .not(".ui-sortable-helper")
                        .not(".ui-sortable-placeholder"),
                  s,
                ]);
        function l() {
          o.push(this);
        }
        for (
          r.push([
            "function" == typeof this.options.items
              ? this.options.items.call(this.element, null, {
                  options: this.options,
                  item: this.currentItem,
                })
              : Y(this.options.items, this.element)
                  .not(".ui-sortable-helper")
                  .not(".ui-sortable-placeholder"),
            this,
          ]),
            t = r.length - 1;
          0 <= t;
          t--
        )
          r[t][0].each(l);
        return Y(o);
      },
      _removeCurrentsFromItems: function () {
        var i = this.currentItem.find(":data(" + this.widgetName + "-item)");
        this.items = Y.grep(this.items, function (e) {
          for (var t = 0; t < i.length; t++) if (i[t] === e.item[0]) return !1;
          return !0;
        });
      },
      _refreshItems: function (e) {
        ((this.items = []), (this.containers = [this]));
        var t,
          i,
          n,
          s,
          o,
          r,
          a,
          l,
          h = this.items,
          c = [
            [
              "function" == typeof this.options.items
                ? this.options.items.call(this.element[0], e, {
                    item: this.currentItem,
                  })
                : Y(this.options.items, this.element),
              this,
            ],
          ],
          u = this._connectWith();
        if (u && this.ready)
          for (t = u.length - 1; 0 <= t; t--)
            for (i = (n = Y(u[t], this.document[0])).length - 1; 0 <= i; i--)
              (s = Y.data(n[i], this.widgetFullName)) &&
                s !== this &&
                !s.options.disabled &&
                (c.push([
                  "function" == typeof s.options.items
                    ? s.options.items.call(s.element[0], e, {
                        item: this.currentItem,
                      })
                    : Y(s.options.items, s.element),
                  s,
                ]),
                this.containers.push(s));
        for (t = c.length - 1; 0 <= t; t--)
          for (o = c[t][1], l = (r = c[t][(i = 0)]).length; i < l; i++)
            ((a = Y(r[i])).data(this.widgetName + "-item", o),
              h.push({
                item: a,
                instance: o,
                width: 0,
                height: 0,
                left: 0,
                top: 0,
              }));
      },
      _refreshItemPositions: function (e) {
        for (var t, i, n = this.items.length - 1; 0 <= n; n--)
          ((t = this.items[n]),
            (this.currentContainer &&
              t.instance !== this.currentContainer &&
              t.item[0] !== this.currentItem[0]) ||
              ((i = this.options.toleranceElement
                ? Y(this.options.toleranceElement, t.item)
                : t.item),
              e || ((t.width = i.outerWidth()), (t.height = i.outerHeight())),
              (i = i.offset()),
              (t.left = i.left),
              (t.top = i.top)));
      },
      refreshPositions: function (e) {
        var t, i;
        if (
          ((this.floating =
            !!this.items.length &&
            ("x" === this.options.axis ||
              this._isFloating(this.items[0].item))),
          null !== this.innermostContainer && this._refreshItemPositions(e),
          this.options.custom && this.options.custom.refreshContainers)
        )
          this.options.custom.refreshContainers.call(this);
        else
          for (t = this.containers.length - 1; 0 <= t; t--)
            ((i = this.containers[t].element.offset()),
              (this.containers[t].containerCache.left = i.left),
              (this.containers[t].containerCache.top = i.top),
              (this.containers[t].containerCache.width =
                this.containers[t].element.outerWidth()),
              (this.containers[t].containerCache.height =
                this.containers[t].element.outerHeight()));
        return this;
      },
      _createPlaceholder: function (i) {
        var n,
          s,
          o = (i = i || this).options;
        ((o.placeholder && o.placeholder.constructor !== String) ||
          ((n = o.placeholder),
          (s = i.currentItem[0].nodeName.toLowerCase()),
          (o.placeholder = {
            element: function () {
              var e = Y("<" + s + ">", i.document[0]);
              return (
                i
                  ._addClass(
                    e,
                    "ui-sortable-placeholder",
                    n || i.currentItem[0].className,
                  )
                  ._removeClass(e, "ui-sortable-helper"),
                "tbody" === s
                  ? i._createTrPlaceholder(
                      i.currentItem.find("tr").eq(0),
                      Y("<tr>", i.document[0]).appendTo(e),
                    )
                  : "tr" === s
                    ? i._createTrPlaceholder(i.currentItem, e)
                    : "img" === s && e.attr("src", i.currentItem.attr("src")),
                n || e.css("visibility", "hidden"),
                e
              );
            },
            update: function (e, t) {
              (n && !o.forcePlaceholderSize) ||
                ((t.height() &&
                  (!o.forcePlaceholderSize || ("tbody" !== s && "tr" !== s))) ||
                  t.height(
                    i.currentItem.innerHeight() -
                      parseInt(i.currentItem.css("paddingTop") || 0, 10) -
                      parseInt(i.currentItem.css("paddingBottom") || 0, 10),
                  ),
                t.width() ||
                  t.width(
                    i.currentItem.innerWidth() -
                      parseInt(i.currentItem.css("paddingLeft") || 0, 10) -
                      parseInt(i.currentItem.css("paddingRight") || 0, 10),
                  ));
            },
          })),
          (i.placeholder = Y(
            o.placeholder.element.call(i.element, i.currentItem),
          )),
          i.currentItem.after(i.placeholder),
          o.placeholder.update(i, i.placeholder));
      },
      _createTrPlaceholder: function (e, t) {
        var i = this;
        e.children().each(function () {
          Y("<td>&#160;</td>", i.document[0])
            .attr("colspan", Y(this).attr("colspan") || 1)
            .appendTo(t);
        });
      },
      _contactContainers: function (e) {
        for (
          var t,
            i,
            n,
            s,
            o,
            r,
            a,
            l,
            h,
            c = null,
            u = null,
            d = this.containers.length - 1;
          0 <= d;
          d--
        )
          Y.contains(this.currentItem[0], this.containers[d].element[0]) ||
            (this._intersectsWith(this.containers[d].containerCache)
              ? (c &&
                  Y.contains(this.containers[d].element[0], c.element[0])) ||
                ((c = this.containers[d]), (u = d))
              : this.containers[d].containerCache.over &&
                (this.containers[d]._trigger("out", e, this._uiHash(this)),
                (this.containers[d].containerCache.over = 0)));
        if ((this.innermostContainer = c))
          if (1 === this.containers.length)
            this.containers[u].containerCache.over ||
              (this.containers[u]._trigger("over", e, this._uiHash(this)),
              (this.containers[u].containerCache.over = 1));
          else {
            for (
              i = 1e4,
                n = null,
                s = (l = c.floating || this._isFloating(this.currentItem))
                  ? "left"
                  : "top",
                o = l ? "width" : "height",
                h = l ? "pageX" : "pageY",
                t = this.items.length - 1;
              0 <= t;
              t--
            )
              Y.contains(
                this.containers[u].element[0],
                this.items[t].item[0],
              ) &&
                this.items[t].item[0] !== this.currentItem[0] &&
                ((r = this.items[t].item.offset()[s]),
                (a = !1),
                e[h] - r > this.items[t][o] / 2 && (a = !0),
                Math.abs(e[h] - r) < i &&
                  ((i = Math.abs(e[h] - r)),
                  (n = this.items[t]),
                  (this.direction = a ? "up" : "down")));
            (n || this.options.dropOnEmpty) &&
              (this.currentContainer !== this.containers[u]
                ? (n
                    ? this._rearrange(e, n, null, !0)
                    : this._rearrange(e, null, this.containers[u].element, !0),
                  this._trigger("change", e, this._uiHash()),
                  this.containers[u]._trigger("change", e, this._uiHash(this)),
                  (this.currentContainer = this.containers[u]),
                  this.options.placeholder.update(
                    this.currentContainer,
                    this.placeholder,
                  ),
                  (this.scrollParent = this.placeholder.scrollParent()),
                  this.scrollParent[0] !== this.document[0] &&
                    "HTML" !== this.scrollParent[0].tagName &&
                    (this.overflowOffset = this.scrollParent.offset()),
                  this.containers[u]._trigger("over", e, this._uiHash(this)),
                  (this.containers[u].containerCache.over = 1))
                : this.currentContainer.containerCache.over ||
                  (this.containers[u]._trigger("over", e, this._uiHash()),
                  (this.currentContainer.containerCache.over = 1)));
          }
      },
      _createHelper: function (e) {
        var t = this.options,
          e =
            "function" == typeof t.helper
              ? Y(t.helper.apply(this.element[0], [e, this.currentItem]))
              : "clone" === t.helper
                ? this.currentItem.clone()
                : this.currentItem;
        return (
          e.parents("body").length || this.appendTo[0].appendChild(e[0]),
          e[0] === this.currentItem[0] &&
            (this._storedCSS = {
              width: this.currentItem[0].style.width,
              height: this.currentItem[0].style.height,
              position: this.currentItem.css("position"),
              top: this.currentItem.css("top"),
              left: this.currentItem.css("left"),
            }),
          (e[0].style.width && !t.forceHelperSize) ||
            e.width(this.currentItem.width()),
          (e[0].style.height && !t.forceHelperSize) ||
            e.height(this.currentItem.height()),
          e
        );
      },
      _adjustOffsetFromHelper: function (e) {
        ("string" == typeof e && (e = e.split(" ")),
          "left" in
            (e = Array.isArray(e) ? { left: +e[0], top: +e[1] || 0 } : e) &&
            (this.offset.click.left = e.left + this.margins.left),
          "right" in e &&
            (this.offset.click.left =
              this.helperProportions.width - e.right + this.margins.left),
          "top" in e && (this.offset.click.top = e.top + this.margins.top),
          "bottom" in e &&
            (this.offset.click.top =
              this.helperProportions.height - e.bottom + this.margins.top));
      },
      _getParentOffset: function () {
        this.offsetParent = this.helper.offsetParent();
        var e = this.offsetParent.offset();
        return (
          "absolute" === this.cssPosition &&
            this.scrollParent[0] !== this.document[0] &&
            Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
            ((e.left += this.scrollParent.scrollLeft()),
            (e.top += this.scrollParent.scrollTop())),
          {
            top:
              (e =
                this.offsetParent[0] === this.document[0].body ||
                (this.offsetParent[0].tagName &&
                  "html" === this.offsetParent[0].tagName.toLowerCase() &&
                  Y.ui.ie)
                  ? { top: 0, left: 0 }
                  : e).top +
              (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
            left:
              e.left +
              (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
          }
        );
      },
      _getRelativeOffset: function () {
        if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
        var e = this.currentItem.position();
        return {
          top:
            e.top -
            (parseInt(this.helper.css("top"), 10) || 0) +
            this.scrollParent.scrollTop(),
          left:
            e.left -
            (parseInt(this.helper.css("left"), 10) || 0) +
            this.scrollParent.scrollLeft(),
        };
      },
      _cacheMargins: function () {
        this.margins = {
          left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
          top: parseInt(this.currentItem.css("marginTop"), 10) || 0,
        };
      },
      _cacheHelperProportions: function () {
        this.helperProportions = {
          width: this.helper.outerWidth(),
          height: this.helper.outerHeight(),
        };
      },
      _setContainment: function () {
        var e,
          t,
          i = this.options;
        ("parent" === i.containment &&
          (i.containment = this.helper[0].parentNode),
          ("document" !== i.containment && "window" !== i.containment) ||
            (this.containment = [
              0 - this.offset.relative.left - this.offset.parent.left,
              0 - this.offset.relative.top - this.offset.parent.top,
              "document" === i.containment
                ? this.document.width()
                : this.window.width() -
                  this.helperProportions.width -
                  this.margins.left,
              ("document" === i.containment
                ? this.document.height() ||
                  document.body.parentNode.scrollHeight
                : this.window.height() ||
                  this.document[0].body.parentNode.scrollHeight) -
                this.helperProportions.height -
                this.margins.top,
            ]),
          /^(document|window|parent)$/.test(i.containment) ||
            ((e = Y(i.containment)[0]),
            (t = Y(i.containment).offset()),
            (i = "hidden" !== Y(e).css("overflow")),
            (this.containment = [
              t.left +
                (parseInt(Y(e).css("borderLeftWidth"), 10) || 0) +
                (parseInt(Y(e).css("paddingLeft"), 10) || 0) -
                this.margins.left,
              t.top +
                (parseInt(Y(e).css("borderTopWidth"), 10) || 0) +
                (parseInt(Y(e).css("paddingTop"), 10) || 0) -
                this.margins.top,
              t.left +
                (i ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) -
                (parseInt(Y(e).css("borderLeftWidth"), 10) || 0) -
                (parseInt(Y(e).css("paddingRight"), 10) || 0) -
                this.helperProportions.width -
                this.margins.left,
              t.top +
                (i
                  ? Math.max(e.scrollHeight, e.offsetHeight)
                  : e.offsetHeight) -
                (parseInt(Y(e).css("borderTopWidth"), 10) || 0) -
                (parseInt(Y(e).css("paddingBottom"), 10) || 0) -
                this.helperProportions.height -
                this.margins.top,
            ])));
      },
      _convertPositionTo: function (e, t) {
        t = t || this.position;
        var i = "absolute" === e ? 1 : -1,
          n =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          e = /(html|body)/i.test(n[0].tagName);
        return {
          top:
            t.top +
            this.offset.relative.top * i +
            this.offset.parent.top * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollTop()
              : e
                ? 0
                : n.scrollTop()) *
              i,
          left:
            t.left +
            this.offset.relative.left * i +
            this.offset.parent.left * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollLeft()
              : e
                ? 0
                : n.scrollLeft()) *
              i,
        };
      },
      _generatePosition: function (e) {
        var t = this.options,
          i = e.pageX,
          n = e.pageY,
          s =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          o = /(html|body)/i.test(s[0].tagName);
        return (
          "relative" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              this.scrollParent[0] !== this.offsetParent[0]) ||
            (this.offset.relative = this._getRelativeOffset()),
          this.originalPosition &&
            (this.containment &&
              (e.pageX - this.offset.click.left < this.containment[0] &&
                (i = this.containment[0] + this.offset.click.left),
              e.pageY - this.offset.click.top < this.containment[1] &&
                (n = this.containment[1] + this.offset.click.top),
              e.pageX - this.offset.click.left > this.containment[2] &&
                (i = this.containment[2] + this.offset.click.left),
              e.pageY - this.offset.click.top > this.containment[3] &&
                (n = this.containment[3] + this.offset.click.top)),
            t.grid &&
              ((e =
                this.originalPageY +
                Math.round((n - this.originalPageY) / t.grid[1]) * t.grid[1]),
              (n =
                !this.containment ||
                (e - this.offset.click.top >= this.containment[1] &&
                  e - this.offset.click.top <= this.containment[3])
                  ? e
                  : e - this.offset.click.top >= this.containment[1]
                    ? e - t.grid[1]
                    : e + t.grid[1]),
              (e =
                this.originalPageX +
                Math.round((i - this.originalPageX) / t.grid[0]) * t.grid[0]),
              (i =
                !this.containment ||
                (e - this.offset.click.left >= this.containment[0] &&
                  e - this.offset.click.left <= this.containment[2])
                  ? e
                  : e - this.offset.click.left >= this.containment[0]
                    ? e - t.grid[0]
                    : e + t.grid[0]))),
          {
            top:
              n -
              this.offset.click.top -
              this.offset.relative.top -
              this.offset.parent.top +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollTop()
                : o
                  ? 0
                  : s.scrollTop()),
            left:
              i -
              this.offset.click.left -
              this.offset.relative.left -
              this.offset.parent.left +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollLeft()
                : o
                  ? 0
                  : s.scrollLeft()),
          }
        );
      },
      _rearrange: function (e, t, i, n) {
        (i
          ? i[0].appendChild(this.placeholder[0])
          : t.item[0].parentNode.insertBefore(
              this.placeholder[0],
              "down" === this.direction ? t.item[0] : t.item[0].nextSibling,
            ),
          (this.counter = this.counter ? ++this.counter : 1));
        var s = this.counter;
        this._delay(function () {
          s === this.counter && this.refreshPositions(!n);
        });
      },
      _clear: function (e, t) {
        this.reverting = !1;
        var i,
          n = [];
        if (
          (!this._noFinalSort &&
            this.currentItem.parent().length &&
            this.placeholder.before(this.currentItem),
          (this._noFinalSort = null),
          this.helper[0] === this.currentItem[0])
        ) {
          for (i in this._storedCSS)
            ("auto" !== this._storedCSS[i] &&
              "static" !== this._storedCSS[i]) ||
              (this._storedCSS[i] = "");
          (this.currentItem.css(this._storedCSS),
            this._removeClass(this.currentItem, "ui-sortable-helper"));
        } else this.currentItem.show();
        function s(t, i, n) {
          return function (e) {
            n._trigger(t, e, i._uiHash(i));
          };
        }
        for (
          this.fromOutside &&
            !t &&
            n.push(function (e) {
              this._trigger("receive", e, this._uiHash(this.fromOutside));
            }),
            (!this.fromOutside &&
              this.domPosition.prev ===
                this.currentItem.prev().not(".ui-sortable-helper")[0] &&
              this.domPosition.parent === this.currentItem.parent()[0]) ||
              t ||
              n.push(function (e) {
                this._trigger("update", e, this._uiHash());
              }),
            this !== this.currentContainer &&
              (t ||
                (n.push(function (e) {
                  this._trigger("remove", e, this._uiHash());
                }),
                n.push(
                  function (t) {
                    return function (e) {
                      t._trigger("receive", e, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ),
                n.push(
                  function (t) {
                    return function (e) {
                      t._trigger("update", e, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ))),
            i = this.containers.length - 1;
          0 <= i;
          i--
        )
          (t || n.push(s("deactivate", this, this.containers[i])),
            this.containers[i].containerCache.over &&
              (n.push(s("out", this, this.containers[i])),
              (this.containers[i].containerCache.over = 0)));
        if (
          (this.storedCursor &&
            (this.document.find("body").css("cursor", this.storedCursor),
            this.storedStylesheet.remove()),
          this._storedOpacity &&
            this.helper.css("opacity", this._storedOpacity),
          this._storedZIndex &&
            this.helper.css(
              "zIndex",
              "auto" === this._storedZIndex ? "" : this._storedZIndex,
            ),
          (this.dragging = !1),
          t || this._trigger("beforeStop", e, this._uiHash()),
          this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
          this.cancelHelperRemoval ||
            (this.helper[0] !== this.currentItem[0] && this.helper.remove(),
            (this.helper = null)),
          !t)
        ) {
          for (i = 0; i < n.length; i++) n[i].call(this, e);
          this._trigger("stop", e, this._uiHash());
        }
        return ((this.fromOutside = !1), !this.cancelHelperRemoval);
      },
      _trigger: function () {
        !1 === Y.Widget.prototype._trigger.apply(this, arguments) &&
          this.cancel();
      },
      _uiHash: function (e) {
        var t = e || this;
        return {
          helper: t.helper,
          placeholder: t.placeholder || Y([]),
          position: t.position,
          originalPosition: t.originalPosition,
          offset: t.positionAbs,
          item: t.currentItem,
          sender: e ? e.element : null,
        };
      },
    }));
  function he(t) {
    return function () {
      var e = this.element.val();
      (t.apply(this, arguments),
        this._refresh(),
        e !== this.element.val() && this._trigger("change"));
    };
  }
  (Y.widget("ui.spinner", {
    version: "1.13.0",
    defaultElement: "<input>",
    widgetEventPrefix: "spin",
    options: {
      classes: {
        "ui-spinner": "ui-corner-all",
        "ui-spinner-down": "ui-corner-br",
        "ui-spinner-up": "ui-corner-tr",
      },
      culture: null,
      icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" },
      incremental: !0,
      max: null,
      min: null,
      numberFormat: null,
      page: 10,
      step: 1,
      change: null,
      spin: null,
      start: null,
      stop: null,
    },
    _create: function () {
      (this._setOption("max", this.options.max),
        this._setOption("min", this.options.min),
        this._setOption("step", this.options.step),
        "" !== this.value() && this._value(this.element.val(), !0),
        this._draw(),
        this._on(this._events),
        this._refresh(),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        }));
    },
    _getCreateOptions: function () {
      var n = this._super(),
        s = this.element;
      return (
        Y.each(["min", "max", "step"], function (e, t) {
          var i = s.attr(t);
          null != i && i.length && (n[t] = i);
        }),
        n
      );
    },
    _events: {
      keydown: function (e) {
        this._start(e) && this._keydown(e) && e.preventDefault();
      },
      keyup: "_stop",
      focus: function () {
        this.previous = this.element.val();
      },
      blur: function (e) {
        this.cancelBlur
          ? delete this.cancelBlur
          : (this._stop(),
            this._refresh(),
            this.previous !== this.element.val() && this._trigger("change", e));
      },
      mousewheel: function (e, t) {
        var i = Y.ui.safeActiveElement(this.document[0]);
        if (this.element[0] === i && t) {
          if (!this.spinning && !this._start(e)) return !1;
          (this._spin((0 < t ? 1 : -1) * this.options.step, e),
            clearTimeout(this.mousewheelTimer),
            (this.mousewheelTimer = this._delay(function () {
              this.spinning && this._stop(e);
            }, 100)),
            e.preventDefault());
        }
      },
      "mousedown .ui-spinner-button": function (e) {
        var t;
        function i() {
          this.element[0] === Y.ui.safeActiveElement(this.document[0]) ||
            (this.element.trigger("focus"),
            (this.previous = t),
            this._delay(function () {
              this.previous = t;
            }));
        }
        ((t =
          this.element[0] === Y.ui.safeActiveElement(this.document[0])
            ? this.previous
            : this.element.val()),
          e.preventDefault(),
          i.call(this),
          (this.cancelBlur = !0),
          this._delay(function () {
            (delete this.cancelBlur, i.call(this));
          }),
          !1 !== this._start(e) &&
            this._repeat(
              null,
              Y(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              e,
            ));
      },
      "mouseup .ui-spinner-button": "_stop",
      "mouseenter .ui-spinner-button": function (e) {
        if (Y(e.currentTarget).hasClass("ui-state-active"))
          return (
            !1 !== this._start(e) &&
            void this._repeat(
              null,
              Y(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              e,
            )
          );
      },
      "mouseleave .ui-spinner-button": "_stop",
    },
    _enhance: function () {
      this.uiSpinner = this.element
        .attr("autocomplete", "off")
        .wrap("<span>")
        .parent()
        .append("<a></a><a></a>");
    },
    _draw: function () {
      (this._enhance(),
        this._addClass(
          this.uiSpinner,
          "ui-spinner",
          "ui-widget ui-widget-content",
        ),
        this._addClass("ui-spinner-input"),
        this.element.attr("role", "spinbutton"),
        (this.buttons = this.uiSpinner
          .children("a")
          .attr("tabIndex", -1)
          .attr("aria-hidden", !0)
          .button({ classes: { "ui-button": "" } })),
        this._removeClass(this.buttons, "ui-corner-all"),
        this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"),
        this._addClass(
          this.buttons.last(),
          "ui-spinner-button ui-spinner-down",
        ),
        this.buttons
          .first()
          .button({ icon: this.options.icons.up, showLabel: !1 }),
        this.buttons
          .last()
          .button({ icon: this.options.icons.down, showLabel: !1 }),
        this.buttons.height() > Math.ceil(0.5 * this.uiSpinner.height()) &&
          0 < this.uiSpinner.height() &&
          this.uiSpinner.height(this.uiSpinner.height()));
    },
    _keydown: function (e) {
      var t = this.options,
        i = Y.ui.keyCode;
      switch (e.keyCode) {
        case i.UP:
          return (this._repeat(null, 1, e), !0);
        case i.DOWN:
          return (this._repeat(null, -1, e), !0);
        case i.PAGE_UP:
          return (this._repeat(null, t.page, e), !0);
        case i.PAGE_DOWN:
          return (this._repeat(null, -t.page, e), !0);
      }
      return !1;
    },
    _start: function (e) {
      return (
        !(!this.spinning && !1 === this._trigger("start", e)) &&
        (this.counter || (this.counter = 1), (this.spinning = !0))
      );
    },
    _repeat: function (e, t, i) {
      ((e = e || 500),
        clearTimeout(this.timer),
        (this.timer = this._delay(function () {
          this._repeat(40, t, i);
        }, e)),
        this._spin(t * this.options.step, i));
    },
    _spin: function (e, t) {
      var i = this.value() || 0;
      (this.counter || (this.counter = 1),
        (i = this._adjustValue(i + e * this._increment(this.counter))),
        (this.spinning && !1 === this._trigger("spin", t, { value: i })) ||
          (this._value(i), this.counter++));
    },
    _increment: function (e) {
      var t = this.options.incremental;
      return t
        ? "function" == typeof t
          ? t(e)
          : Math.floor((e * e * e) / 5e4 - (e * e) / 500 + (17 * e) / 200 + 1)
        : 1;
    },
    _precision: function () {
      var e = this._precisionOf(this.options.step);
      return (e =
        null !== this.options.min
          ? Math.max(e, this._precisionOf(this.options.min))
          : e);
    },
    _precisionOf: function (e) {
      var t = e.toString(),
        e = t.indexOf(".");
      return -1 === e ? 0 : t.length - e - 1;
    },
    _adjustValue: function (e) {
      var t = this.options,
        i = null !== t.min ? t.min : 0,
        n = e - i;
      return (
        (e = i + Math.round(n / t.step) * t.step),
        (e = parseFloat(e.toFixed(this._precision()))),
        null !== t.max && e > t.max
          ? t.max
          : null !== t.min && e < t.min
            ? t.min
            : e
      );
    },
    _stop: function (e) {
      this.spinning &&
        (clearTimeout(this.timer),
        clearTimeout(this.mousewheelTimer),
        (this.counter = 0),
        (this.spinning = !1),
        this._trigger("stop", e));
    },
    _setOption: function (e, t) {
      var i;
      if ("culture" === e || "numberFormat" === e)
        return (
          (i = this._parse(this.element.val())),
          (this.options[e] = t),
          void this.element.val(this._format(i))
        );
      (("max" !== e && "min" !== e && "step" !== e) ||
        ("string" == typeof t && (t = this._parse(t))),
        "icons" === e &&
          ((i = this.buttons.first().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.up),
          this._addClass(i, null, t.up),
          (i = this.buttons.last().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.down),
          this._addClass(i, null, t.down)),
        this._super(e, t));
    },
    _setOptionDisabled: function (e) {
      (this._super(e),
        this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!e),
        this.element.prop("disabled", !!e),
        this.buttons.button(e ? "disable" : "enable"));
    },
    _setOptions: he(function (e) {
      this._super(e);
    }),
    _parse: function (e) {
      return "" ===
        (e =
          "string" == typeof e && "" !== e
            ? window.Globalize && this.options.numberFormat
              ? Globalize.parseFloat(e, 10, this.options.culture)
              : +e
            : e) || isNaN(e)
        ? null
        : e;
    },
    _format: function (e) {
      return "" === e
        ? ""
        : window.Globalize && this.options.numberFormat
          ? Globalize.format(e, this.options.numberFormat, this.options.culture)
          : e;
    },
    _refresh: function () {
      this.element.attr({
        "aria-valuemin": this.options.min,
        "aria-valuemax": this.options.max,
        "aria-valuenow": this._parse(this.element.val()),
      });
    },
    isValid: function () {
      var e = this.value();
      return null !== e && e === this._adjustValue(e);
    },
    _value: function (e, t) {
      var i;
      ("" !== e &&
        null !== (i = this._parse(e)) &&
        (t || (i = this._adjustValue(i)), (e = this._format(i))),
        this.element.val(e),
        this._refresh());
    },
    _destroy: function () {
      (this.element
        .prop("disabled", !1)
        .removeAttr(
          "autocomplete role aria-valuemin aria-valuemax aria-valuenow",
        ),
        this.uiSpinner.replaceWith(this.element));
    },
    stepUp: he(function (e) {
      this._stepUp(e);
    }),
    _stepUp: function (e) {
      this._start() && (this._spin((e || 1) * this.options.step), this._stop());
    },
    stepDown: he(function (e) {
      this._stepDown(e);
    }),
    _stepDown: function (e) {
      this._start() &&
        (this._spin((e || 1) * -this.options.step), this._stop());
    },
    pageUp: he(function (e) {
      this._stepUp((e || 1) * this.options.page);
    }),
    pageDown: he(function (e) {
      this._stepDown((e || 1) * this.options.page);
    }),
    value: function (e) {
      if (!arguments.length) return this._parse(this.element.val());
      he(this._value).call(this, e);
    },
    widget: function () {
      return this.uiSpinner;
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.spinner", Y.ui.spinner, {
        _enhance: function () {
          this.uiSpinner = this.element
            .attr("autocomplete", "off")
            .wrap(this._uiSpinnerHtml())
            .parent()
            .append(this._buttonHtml());
        },
        _uiSpinnerHtml: function () {
          return "<span>";
        },
        _buttonHtml: function () {
          return "<a></a><a></a>";
        },
      }));
  var ce;
  Y.ui.spinner;
  (Y.widget("ui.tabs", {
    version: "1.13.0",
    delay: 300,
    options: {
      active: null,
      classes: {
        "ui-tabs": "ui-corner-all",
        "ui-tabs-nav": "ui-corner-all",
        "ui-tabs-panel": "ui-corner-bottom",
        "ui-tabs-tab": "ui-corner-top",
      },
      collapsible: !1,
      event: "click",
      heightStyle: "content",
      hide: null,
      show: null,
      activate: null,
      beforeActivate: null,
      beforeLoad: null,
      load: null,
    },
    _isLocal:
      ((ce = /#.*$/),
      function (e) {
        var t = e.href.replace(ce, ""),
          i = location.href.replace(ce, "");
        try {
          t = decodeURIComponent(t);
        } catch (e) {}
        try {
          i = decodeURIComponent(i);
        } catch (e) {}
        return 1 < e.hash.length && t === i;
      }),
    _create: function () {
      var t = this,
        e = this.options;
      ((this.running = !1),
        this._addClass("ui-tabs", "ui-widget ui-widget-content"),
        this._toggleClass("ui-tabs-collapsible", null, e.collapsible),
        this._processTabs(),
        (e.active = this._initialActive()),
        Array.isArray(e.disabled) &&
          (e.disabled = Y.uniqueSort(
            e.disabled.concat(
              Y.map(this.tabs.filter(".ui-state-disabled"), function (e) {
                return t.tabs.index(e);
              }),
            ),
          ).sort()),
        !1 !== this.options.active && this.anchors.length
          ? (this.active = this._findActive(e.active))
          : (this.active = Y()),
        this._refresh(),
        this.active.length && this.load(e.active));
    },
    _initialActive: function () {
      var i = this.options.active,
        e = this.options.collapsible,
        n = location.hash.substring(1);
      return (
        null === i &&
          (n &&
            this.tabs.each(function (e, t) {
              if (Y(t).attr("aria-controls") === n) return ((i = e), !1);
            }),
          (null !==
            (i =
              null === i
                ? this.tabs.index(this.tabs.filter(".ui-tabs-active"))
                : i) &&
            -1 !== i) ||
            (i = !!this.tabs.length && 0)),
        !1 !== i &&
          -1 === (i = this.tabs.index(this.tabs.eq(i))) &&
          (i = !e && 0),
        (i = !e && !1 === i && this.anchors.length ? 0 : i)
      );
    },
    _getCreateEventData: function () {
      return {
        tab: this.active,
        panel: this.active.length ? this._getPanelForTab(this.active) : Y(),
      };
    },
    _tabKeydown: function (e) {
      var t = Y(Y.ui.safeActiveElement(this.document[0])).closest("li"),
        i = this.tabs.index(t),
        n = !0;
      if (!this._handlePageNav(e)) {
        switch (e.keyCode) {
          case Y.ui.keyCode.RIGHT:
          case Y.ui.keyCode.DOWN:
            i++;
            break;
          case Y.ui.keyCode.UP:
          case Y.ui.keyCode.LEFT:
            ((n = !1), i--);
            break;
          case Y.ui.keyCode.END:
            i = this.anchors.length - 1;
            break;
          case Y.ui.keyCode.HOME:
            i = 0;
            break;
          case Y.ui.keyCode.SPACE:
            return (
              e.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i)
            );
          case Y.ui.keyCode.ENTER:
            return (
              e.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i !== this.options.active && i)
            );
          default:
            return;
        }
        (e.preventDefault(),
          clearTimeout(this.activating),
          (i = this._focusNextTab(i, n)),
          e.ctrlKey ||
            e.metaKey ||
            (t.attr("aria-selected", "false"),
            this.tabs.eq(i).attr("aria-selected", "true"),
            (this.activating = this._delay(function () {
              this.option("active", i);
            }, this.delay))));
      }
    },
    _panelKeydown: function (e) {
      this._handlePageNav(e) ||
        (e.ctrlKey &&
          e.keyCode === Y.ui.keyCode.UP &&
          (e.preventDefault(), this.active.trigger("focus")));
    },
    _handlePageNav: function (e) {
      return e.altKey && e.keyCode === Y.ui.keyCode.PAGE_UP
        ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0)
        : e.altKey && e.keyCode === Y.ui.keyCode.PAGE_DOWN
          ? (this._activate(this._focusNextTab(this.options.active + 1, !0)),
            !0)
          : void 0;
    },
    _findNextTab: function (e, t) {
      var i = this.tabs.length - 1;
      for (
        ;
        -1 !==
        Y.inArray((e = (e = i < e ? 0 : e) < 0 ? i : e), this.options.disabled);

      )
        e = t ? e + 1 : e - 1;
      return e;
    },
    _focusNextTab: function (e, t) {
      return (
        (e = this._findNextTab(e, t)),
        this.tabs.eq(e).trigger("focus"),
        e
      );
    },
    _setOption: function (e, t) {
      "active" !== e
        ? (this._super(e, t),
          "collapsible" === e &&
            (this._toggleClass("ui-tabs-collapsible", null, t),
            t || !1 !== this.options.active || this._activate(0)),
          "event" === e && this._setupEvents(t),
          "heightStyle" === e && this._setupHeightStyle(t))
        : this._activate(t);
    },
    _sanitizeSelector: function (e) {
      return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "";
    },
    refresh: function () {
      var e = this.options,
        t = this.tablist.children(":has(a[href])");
      ((e.disabled = Y.map(t.filter(".ui-state-disabled"), function (e) {
        return t.index(e);
      })),
        this._processTabs(),
        !1 !== e.active && this.anchors.length
          ? this.active.length && !Y.contains(this.tablist[0], this.active[0])
            ? this.tabs.length === e.disabled.length
              ? ((e.active = !1), (this.active = Y()))
              : this._activate(this._findNextTab(Math.max(0, e.active - 1), !1))
            : (e.active = this.tabs.index(this.active))
          : ((e.active = !1), (this.active = Y())),
        this._refresh());
    },
    _refresh: function () {
      (this._setOptionDisabled(this.options.disabled),
        this._setupEvents(this.options.event),
        this._setupHeightStyle(this.options.heightStyle),
        this.tabs.not(this.active).attr({
          "aria-selected": "false",
          "aria-expanded": "false",
          tabIndex: -1,
        }),
        this.panels
          .not(this._getPanelForTab(this.active))
          .hide()
          .attr({ "aria-hidden": "true" }),
        this.active.length
          ? (this.active.attr({
              "aria-selected": "true",
              "aria-expanded": "true",
              tabIndex: 0,
            }),
            this._addClass(this.active, "ui-tabs-active", "ui-state-active"),
            this._getPanelForTab(this.active)
              .show()
              .attr({ "aria-hidden": "false" }))
          : this.tabs.eq(0).attr("tabIndex", 0));
    },
    _processTabs: function () {
      var l = this,
        e = this.tabs,
        t = this.anchors,
        i = this.panels;
      ((this.tablist = this._getList().attr("role", "tablist")),
        this._addClass(
          this.tablist,
          "ui-tabs-nav",
          "ui-helper-reset ui-helper-clearfix ui-widget-header",
        ),
        this.tablist
          .on("mousedown" + this.eventNamespace, "> li", function (e) {
            Y(this).is(".ui-state-disabled") && e.preventDefault();
          })
          .on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () {
            Y(this).closest("li").is(".ui-state-disabled") && this.blur();
          }),
        (this.tabs = this.tablist
          .find("> li:has(a[href])")
          .attr({ role: "tab", tabIndex: -1 })),
        this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"),
        (this.anchors = this.tabs
          .map(function () {
            return Y("a", this)[0];
          })
          .attr({ tabIndex: -1 })),
        this._addClass(this.anchors, "ui-tabs-anchor"),
        (this.panels = Y()),
        this.anchors.each(function (e, t) {
          var i,
            n,
            s,
            o = Y(t).uniqueId().attr("id"),
            r = Y(t).closest("li"),
            a = r.attr("aria-controls");
          (l._isLocal(t)
            ? ((s = (i = t.hash).substring(1)),
              (n = l.element.find(l._sanitizeSelector(i))))
            : ((s = r.attr("aria-controls") || Y({}).uniqueId()[0].id),
              (n = l.element.find((i = "#" + s))).length ||
                (n = l._createPanel(s)).insertAfter(
                  l.panels[e - 1] || l.tablist,
                ),
              n.attr("aria-live", "polite")),
            n.length && (l.panels = l.panels.add(n)),
            a && r.data("ui-tabs-aria-controls", a),
            r.attr({ "aria-controls": s, "aria-labelledby": o }),
            n.attr("aria-labelledby", o));
        }),
        this.panels.attr("role", "tabpanel"),
        this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"),
        e &&
          (this._off(e.not(this.tabs)),
          this._off(t.not(this.anchors)),
          this._off(i.not(this.panels))));
    },
    _getList: function () {
      return this.tablist || this.element.find("ol, ul").eq(0);
    },
    _createPanel: function (e) {
      return Y("<div>").attr("id", e).data("ui-tabs-destroy", !0);
    },
    _setOptionDisabled: function (e) {
      var t, i;
      for (
        Array.isArray(e) &&
          (e.length ? e.length === this.anchors.length && (e = !0) : (e = !1)),
          i = 0;
        (t = this.tabs[i]);
        i++
      )
        ((t = Y(t)),
          !0 === e || -1 !== Y.inArray(i, e)
            ? (t.attr("aria-disabled", "true"),
              this._addClass(t, null, "ui-state-disabled"))
            : (t.removeAttr("aria-disabled"),
              this._removeClass(t, null, "ui-state-disabled")));
      ((this.options.disabled = e),
        this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !0 === e,
        ));
    },
    _setupEvents: function (e) {
      var i = {};
      (e &&
        Y.each(e.split(" "), function (e, t) {
          i[t] = "_eventHandler";
        }),
        this._off(this.anchors.add(this.tabs).add(this.panels)),
        this._on(!0, this.anchors, {
          click: function (e) {
            e.preventDefault();
          },
        }),
        this._on(this.anchors, i),
        this._on(this.tabs, { keydown: "_tabKeydown" }),
        this._on(this.panels, { keydown: "_panelKeydown" }),
        this._focusable(this.tabs),
        this._hoverable(this.tabs));
    },
    _setupHeightStyle: function (e) {
      var i,
        t = this.element.parent();
      "fill" === e
        ? ((i = t.height()),
          (i -= this.element.outerHeight() - this.element.height()),
          this.element.siblings(":visible").each(function () {
            var e = Y(this),
              t = e.css("position");
            "absolute" !== t && "fixed" !== t && (i -= e.outerHeight(!0));
          }),
          this.element
            .children()
            .not(this.panels)
            .each(function () {
              i -= Y(this).outerHeight(!0);
            }),
          this.panels
            .each(function () {
              Y(this).height(
                Math.max(0, i - Y(this).innerHeight() + Y(this).height()),
              );
            })
            .css("overflow", "auto"))
        : "auto" === e &&
          ((i = 0),
          this.panels
            .each(function () {
              i = Math.max(i, Y(this).height("").height());
            })
            .height(i));
    },
    _eventHandler: function (e) {
      var t = this.options,
        i = this.active,
        n = Y(e.currentTarget).closest("li"),
        s = n[0] === i[0],
        o = s && t.collapsible,
        r = o ? Y() : this._getPanelForTab(n),
        a = i.length ? this._getPanelForTab(i) : Y(),
        i = { oldTab: i, oldPanel: a, newTab: o ? Y() : n, newPanel: r };
      (e.preventDefault(),
        n.hasClass("ui-state-disabled") ||
          n.hasClass("ui-tabs-loading") ||
          this.running ||
          (s && !t.collapsible) ||
          !1 === this._trigger("beforeActivate", e, i) ||
          ((t.active = !o && this.tabs.index(n)),
          (this.active = s ? Y() : n),
          this.xhr && this.xhr.abort(),
          a.length ||
            r.length ||
            Y.error("jQuery UI Tabs: Mismatching fragment identifier."),
          r.length && this.load(this.tabs.index(n), e),
          this._toggle(e, i)));
    },
    _toggle: function (e, t) {
      var i = this,
        n = t.newPanel,
        s = t.oldPanel;
      function o() {
        ((i.running = !1), i._trigger("activate", e, t));
      }
      function r() {
        (i._addClass(
          t.newTab.closest("li"),
          "ui-tabs-active",
          "ui-state-active",
        ),
          n.length && i.options.show
            ? i._show(n, i.options.show, o)
            : (n.show(), o()));
      }
      ((this.running = !0),
        s.length && this.options.hide
          ? this._hide(s, this.options.hide, function () {
              (i._removeClass(
                t.oldTab.closest("li"),
                "ui-tabs-active",
                "ui-state-active",
              ),
                r());
            })
          : (this._removeClass(
              t.oldTab.closest("li"),
              "ui-tabs-active",
              "ui-state-active",
            ),
            s.hide(),
            r()),
        s.attr("aria-hidden", "true"),
        t.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }),
        n.length && s.length
          ? t.oldTab.attr("tabIndex", -1)
          : n.length &&
            this.tabs
              .filter(function () {
                return 0 === Y(this).attr("tabIndex");
              })
              .attr("tabIndex", -1),
        n.attr("aria-hidden", "false"),
        t.newTab.attr({
          "aria-selected": "true",
          "aria-expanded": "true",
          tabIndex: 0,
        }));
    },
    _activate: function (e) {
      var e = this._findActive(e);
      e[0] !== this.active[0] &&
        ((e = (e = !e.length ? this.active : e).find(".ui-tabs-anchor")[0]),
        this._eventHandler({
          target: e,
          currentTarget: e,
          preventDefault: Y.noop,
        }));
    },
    _findActive: function (e) {
      return !1 === e ? Y() : this.tabs.eq(e);
    },
    _getIndex: function (e) {
      return (e =
        "string" == typeof e
          ? this.anchors.index(
              this.anchors.filter("[href$='" + Y.escapeSelector(e) + "']"),
            )
          : e);
    },
    _destroy: function () {
      (this.xhr && this.xhr.abort(),
        this.tablist.removeAttr("role").off(this.eventNamespace),
        this.anchors.removeAttr("role tabIndex").removeUniqueId(),
        this.tabs.add(this.panels).each(function () {
          Y.data(this, "ui-tabs-destroy")
            ? Y(this).remove()
            : Y(this).removeAttr(
                "role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded",
              );
        }),
        this.tabs.each(function () {
          var e = Y(this),
            t = e.data("ui-tabs-aria-controls");
          t
            ? e.attr("aria-controls", t).removeData("ui-tabs-aria-controls")
            : e.removeAttr("aria-controls");
        }),
        this.panels.show(),
        "content" !== this.options.heightStyle &&
          this.panels.css("height", ""));
    },
    enable: function (i) {
      var e = this.options.disabled;
      !1 !== e &&
        ((e =
          void 0 !== i &&
          ((i = this._getIndex(i)),
          Array.isArray(e)
            ? Y.map(e, function (e) {
                return e !== i ? e : null;
              })
            : Y.map(this.tabs, function (e, t) {
                return t !== i ? t : null;
              }))),
        this._setOptionDisabled(e));
    },
    disable: function (e) {
      var t = this.options.disabled;
      if (!0 !== t) {
        if (void 0 === e) t = !0;
        else {
          if (((e = this._getIndex(e)), -1 !== Y.inArray(e, t))) return;
          t = Array.isArray(t) ? Y.merge([e], t).sort() : [e];
        }
        this._setOptionDisabled(t);
      }
    },
    load: function (e, n) {
      e = this._getIndex(e);
      function s(e, t) {
        ("abort" === t && o.panels.stop(!1, !0),
          o._removeClass(i, "ui-tabs-loading"),
          r.removeAttr("aria-busy"),
          e === o.xhr && delete o.xhr);
      }
      var o = this,
        i = this.tabs.eq(e),
        e = i.find(".ui-tabs-anchor"),
        r = this._getPanelForTab(i),
        a = { tab: i, panel: r };
      this._isLocal(e[0]) ||
        ((this.xhr = Y.ajax(this._ajaxSettings(e, n, a))),
        this.xhr &&
          "canceled" !== this.xhr.statusText &&
          (this._addClass(i, "ui-tabs-loading"),
          r.attr("aria-busy", "true"),
          this.xhr
            .done(function (e, t, i) {
              setTimeout(function () {
                (r.html(e), o._trigger("load", n, a), s(i, t));
              }, 1);
            })
            .fail(function (e, t) {
              setTimeout(function () {
                s(e, t);
              }, 1);
            })));
    },
    _ajaxSettings: function (e, i, n) {
      var s = this;
      return {
        url: e.attr("href").replace(/#.*$/, ""),
        beforeSend: function (e, t) {
          return s._trigger(
            "beforeLoad",
            i,
            Y.extend({ jqXHR: e, ajaxSettings: t }, n),
          );
        },
      };
    },
    _getPanelForTab: function (e) {
      e = Y(e).attr("aria-controls");
      return this.element.find(this._sanitizeSelector("#" + e));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tabs", Y.ui.tabs, {
        _processTabs: function () {
          (this._superApply(arguments), this._addClass(this.tabs, "ui-tab"));
        },
      }));
  Y.ui.tabs;
  (Y.widget("ui.tooltip", {
    version: "1.13.0",
    options: {
      classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" },
      content: function () {
        var e = Y(this).attr("title");
        return Y("<a>").text(e).html();
      },
      hide: !0,
      items: "[title]:not([disabled])",
      position: {
        my: "left top+15",
        at: "left bottom",
        collision: "flipfit flip",
      },
      show: !0,
      track: !1,
      close: null,
      open: null,
    },
    _addDescribedBy: function (e, t) {
      var i = (e.attr("aria-describedby") || "").split(/\s+/);
      (i.push(t),
        e
          .data("ui-tooltip-id", t)
          .attr("aria-describedby", String.prototype.trim.call(i.join(" "))));
    },
    _removeDescribedBy: function (e) {
      var t = e.data("ui-tooltip-id"),
        i = (e.attr("aria-describedby") || "").split(/\s+/),
        t = Y.inArray(t, i);
      (-1 !== t && i.splice(t, 1),
        e.removeData("ui-tooltip-id"),
        (i = String.prototype.trim.call(i.join(" ")))
          ? e.attr("aria-describedby", i)
          : e.removeAttr("aria-describedby"));
    },
    _create: function () {
      (this._on({ mouseover: "open", focusin: "open" }),
        (this.tooltips = {}),
        (this.parents = {}),
        (this.liveRegion = Y("<div>")
          .attr({
            role: "log",
            "aria-live": "assertive",
            "aria-relevant": "additions",
          })
          .appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        (this.disabledTitles = Y([])));
    },
    _setOption: function (e, t) {
      var i = this;
      (this._super(e, t),
        "content" === e &&
          Y.each(this.tooltips, function (e, t) {
            i._updateContent(t.element);
          }));
    },
    _setOptionDisabled: function (e) {
      this[e ? "_disable" : "_enable"]();
    },
    _disable: function () {
      var n = this;
      (Y.each(this.tooltips, function (e, t) {
        var i = Y.Event("blur");
        ((i.target = i.currentTarget = t.element[0]), n.close(i, !0));
      }),
        (this.disabledTitles = this.disabledTitles.add(
          this.element
            .find(this.options.items)
            .addBack()
            .filter(function () {
              var e = Y(this);
              if (e.is("[title]"))
                return e
                  .data("ui-tooltip-title", e.attr("title"))
                  .removeAttr("title");
            }),
        )));
    },
    _enable: function () {
      (this.disabledTitles.each(function () {
        var e = Y(this);
        e.data("ui-tooltip-title") &&
          e.attr("title", e.data("ui-tooltip-title"));
      }),
        (this.disabledTitles = Y([])));
    },
    open: function (e) {
      var i = this,
        t = Y(e ? e.target : this.element).closest(this.options.items);
      t.length &&
        !t.data("ui-tooltip-id") &&
        (t.attr("title") && t.data("ui-tooltip-title", t.attr("title")),
        t.data("ui-tooltip-open", !0),
        e &&
          "mouseover" === e.type &&
          t.parents().each(function () {
            var e,
              t = Y(this);
            (t.data("ui-tooltip-open") &&
              (((e = Y.Event("blur")).target = e.currentTarget = this),
              i.close(e, !0)),
              t.attr("title") &&
                (t.uniqueId(),
                (i.parents[this.id] = {
                  element: this,
                  title: t.attr("title"),
                }),
                t.attr("title", "")));
          }),
        this._registerCloseHandlers(e, t),
        this._updateContent(t, e));
    },
    _updateContent: function (t, i) {
      var e = this.options.content,
        n = this,
        s = i ? i.type : null;
      if ("string" == typeof e || e.nodeType || e.jquery)
        return this._open(i, t, e);
      (e = e.call(t[0], function (e) {
        n._delay(function () {
          t.data("ui-tooltip-open") && (i && (i.type = s), this._open(i, t, e));
        });
      })) && this._open(i, t, e);
    },
    _open: function (e, t, i) {
      var n,
        s,
        o,
        r = Y.extend({}, this.options.position);
      function a(e) {
        ((r.of = e), s.is(":hidden") || s.position(r));
      }
      i &&
        ((n = this._find(t))
          ? n.tooltip.find(".ui-tooltip-content").html(i)
          : (t.is("[title]") &&
              (e && "mouseover" === e.type
                ? t.attr("title", "")
                : t.removeAttr("title")),
            (n = this._tooltip(t)),
            (s = n.tooltip),
            this._addDescribedBy(t, s.attr("id")),
            s.find(".ui-tooltip-content").html(i),
            this.liveRegion.children().hide(),
            (i = Y("<div>").html(s.find(".ui-tooltip-content").html()))
              .removeAttr("name")
              .find("[name]")
              .removeAttr("name"),
            i.removeAttr("id").find("[id]").removeAttr("id"),
            i.appendTo(this.liveRegion),
            this.options.track && e && /^mouse/.test(e.type)
              ? (this._on(this.document, { mousemove: a }), a(e))
              : s.position(Y.extend({ of: t }, this.options.position)),
            s.hide(),
            this._show(s, this.options.show),
            this.options.track &&
              this.options.show &&
              this.options.show.delay &&
              (o = this.delayedShow =
                setInterval(function () {
                  s.is(":visible") && (a(r.of), clearInterval(o));
                }, 13)),
            this._trigger("open", e, { tooltip: s })));
    },
    _registerCloseHandlers: function (e, t) {
      var i = {
        keyup: function (e) {
          e.keyCode === Y.ui.keyCode.ESCAPE &&
            (((e = Y.Event(e)).currentTarget = t[0]), this.close(e, !0));
        },
      };
      (t[0] !== this.element[0] &&
        (i.remove = function () {
          this._removeTooltip(this._find(t).tooltip);
        }),
        (e && "mouseover" !== e.type) || (i.mouseleave = "close"),
        (e && "focusin" !== e.type) || (i.focusout = "close"),
        this._on(!0, t, i));
    },
    close: function (e) {
      var t,
        i = this,
        n = Y(e ? e.currentTarget : this.element),
        s = this._find(n);
      s
        ? ((t = s.tooltip),
          s.closing ||
            (clearInterval(this.delayedShow),
            n.data("ui-tooltip-title") &&
              !n.attr("title") &&
              n.attr("title", n.data("ui-tooltip-title")),
            this._removeDescribedBy(n),
            (s.hiding = !0),
            t.stop(!0),
            this._hide(t, this.options.hide, function () {
              i._removeTooltip(Y(this));
            }),
            n.removeData("ui-tooltip-open"),
            this._off(n, "mouseleave focusout keyup"),
            n[0] !== this.element[0] && this._off(n, "remove"),
            this._off(this.document, "mousemove"),
            e &&
              "mouseleave" === e.type &&
              Y.each(this.parents, function (e, t) {
                (Y(t.element).attr("title", t.title), delete i.parents[e]);
              }),
            (s.closing = !0),
            this._trigger("close", e, { tooltip: t }),
            s.hiding || (s.closing = !1)))
        : n.removeData("ui-tooltip-open");
    },
    _tooltip: function (e) {
      var t = Y("<div>").attr("role", "tooltip"),
        i = Y("<div>").appendTo(t),
        n = t.uniqueId().attr("id");
      return (
        this._addClass(i, "ui-tooltip-content"),
        this._addClass(t, "ui-tooltip", "ui-widget ui-widget-content"),
        t.appendTo(this._appendTo(e)),
        (this.tooltips[n] = { element: e, tooltip: t })
      );
    },
    _find: function (e) {
      e = e.data("ui-tooltip-id");
      return e ? this.tooltips[e] : null;
    },
    _removeTooltip: function (e) {
      (clearInterval(this.delayedShow),
        e.remove(),
        delete this.tooltips[e.attr("id")]);
    },
    _appendTo: function (e) {
      e = e.closest(".ui-front, dialog");
      return (e = !e.length ? this.document[0].body : e);
    },
    _destroy: function () {
      var n = this;
      (Y.each(this.tooltips, function (e, t) {
        var i = Y.Event("blur"),
          t = t.element;
        ((i.target = i.currentTarget = t[0]),
          n.close(i, !0),
          Y("#" + e).remove(),
          t.data("ui-tooltip-title") &&
            (t.attr("title") || t.attr("title", t.data("ui-tooltip-title")),
            t.removeData("ui-tooltip-title")));
      }),
        this.liveRegion.remove());
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tooltip", Y.ui.tooltip, {
        options: { tooltipClass: null },
        _tooltip: function () {
          var e = this._superApply(arguments);
          return (
            this.options.tooltipClass &&
              e.tooltip.addClass(this.options.tooltipClass),
            e
          );
        },
      }));
  Y.ui.tooltip;
}),
  (function (e) {
    var t, i, n;
    function s(e, t) {
      var i, n;
      1 < e.originalEvent.touches.length ||
        (e.preventDefault(),
        (i = e.originalEvent.changedTouches[0]),
        (n = document.createEvent("MouseEvents")).initMouseEvent(
          t,
          !0,
          !0,
          window,
          1,
          i.screenX,
          i.screenY,
          i.clientX,
          i.clientY,
          !1,
          !1,
          !1,
          !1,
          0,
          null,
        ),
        e.target.dispatchEvent(n));
    }
    ((e.support.touch =
      "ontouchend" in document || 0 < navigator.maxTouchPoints),
      e.support.touch &&
        ((t = e.ui.mouse.prototype),
        (i = t._mouseInit),
        (t._touchStart = function (e) {
          !n &&
            this._mouseCapture(e.originalEvent.changedTouches[0]) &&
            ((n = !0),
            (this._touchMoved = !1),
            s(e, "mouseover"),
            s(e, "mousemove"),
            s(e, "mousedown"));
        }),
        (t._touchMove = function (e) {
          n && ((this._touchMoved = !0), s(e, "mousemove"));
        }),
        (t._touchEnd = function (e) {
          n &&
            (s(e, "mouseup"),
            s(e, "mouseout"),
            this._touchMoved || s(e, "click"),
            (n = !1));
        }),
        (t._mouseInit = function () {
          (this.element
            .bind("touchstart", e.proxy(this, "_touchStart"))
            .bind("touchmove", e.proxy(this, "_touchMove"))
            .bind("touchend", e.proxy(this, "_touchEnd")),
            i.call(this));
        })));
  })(jQuery),
  (function (e) {
    (e.widget("ui.dialog", e.ui.dialog, {
      _allowInteraction: function (e) {
        return !0;
      },
    }),
      (e.ui.dialog.prototype._focusTabbable = function () {}));
  })(jQuery));
/*!@license H5P.Transition-1.0/transition.js by Joubel licensed under MIT*/ jQuery =
  oldJQuery;
(((H5P = H5P || {}).Transition = (function () {
  Transition = {
    transitionEndEventNames: {
      WebkitTransition: "webkitTransitionEnd",
      transition: "transitionend",
      MozTransition: "transitionend",
      OTransition: "oTransitionEnd",
      msTransition: "MSTransitionEnd",
    },
    cache: [],
    getVendorPropertyName: function (e) {
      if (void 0 !== Transition.cache[e]) return Transition.cache[e];
      var t = document.createElement("div");
      if (e in t.style) Transition.cache[e] = e;
      else {
        var i = ["Moz", "Webkit", "O", "ms"],
          n = e.charAt(0).toUpperCase() + e.substr(1);
        if (e in t.style) Transition.cache[e] = e;
        else
          for (var s = 0; s < i.length; ++s) {
            var o = i[s] + n;
            if (o in t.style) {
              Transition.cache[e] = o;
              break;
            }
          }
      }
      return Transition.cache[e];
    },
    getTransitionEndEventName: function () {
      return (
        Transition.transitionEndEventNames[
          Transition.getVendorPropertyName("transition")
        ] || void 0
      );
    },
    onTransitionEnd: function (e, t, i) {
      ((i = i || 1e3),
        (Transition.transitionEndEventName =
          Transition.transitionEndEventName ||
          Transition.getTransitionEndEventName()));
      function n() {
        s ||
          (e.off(Transition.transitionEndEventName, t),
          (s = !0),
          clearTimeout(o),
          t());
      }
      var s = !1,
        o = setTimeout(function () {
          n();
        }, i);
      e.on(Transition.transitionEndEventName, function () {
        n();
      });
    },
  };
  function n(e, t) {
    var i;
    t >= e.length ||
      ((i = e[t]),
      H5P.Transition.onTransitionEnd(
        i.$element,
        function () {
          (i.end && i.end(), !0 !== i.break && n(e, t + 1));
        },
        i.timeout || void 0,
      ));
  }
  return (
    (Transition.sequence = function (e) {
      n(e, 0);
    }),
    Transition
  );
})(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelHelpTextDialog = (function (c) {
    var u = 0;
    function e(e, t, i) {
      H5P.EventDispatcher.call(this);
      var n = this,
        s = "joubel-help-text-header-" + ++u,
        o = "joubel-help-text-body-" + u,
        r = c("<div>", {
          class: "joubel-help-text-dialog-box",
          role: "dialog",
          "aria-labelledby": s,
          "aria-describedby": o,
        });
      c("<div>", { class: "joubel-help-text-dialog-background" }).appendTo(r);
      var a = c("<div>", {
        class: "joubel-help-text-dialog-container",
      }).appendTo(r);
      (c("<div>", {
        class: "joubel-help-text-header",
        id: s,
        role: "header",
        html: e,
      }).appendTo(a),
        c("<div>", {
          class: "joubel-help-text-body",
          id: o,
          html: t,
          role: "document",
          tabindex: 0,
        }).appendTo(a));
      function l() {
        (r.remove(), n.trigger("closed"));
      }
      var h = c("<div>", {
        class: "joubel-help-text-remove",
        role: "button",
        title: i,
        tabindex: 1,
        click: l,
        keydown: function (e) {
          -1 !== [32, 13].indexOf(e.which) && (e.preventDefault(), l());
        },
      }).appendTo(a);
      ((n.getElement = function () {
        return r;
      }),
        (n.focus = function () {
          h.focus();
        }));
    }
    return ((e.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = e);
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelMessageDialog = (function (o) {
    return function (e, t) {
      function i() {
        (n.remove(), clearTimeout(s), e.off("click.messageDialog"));
      }
      var n = o("<div/>", { class: "joubel-message-dialog", text: t }).appendTo(
          e,
        ),
        s = setTimeout(i, 3e3);
      return (e.on("click.messageDialog", i), n);
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressCircle = (function (a) {
    function e(t, e, i, n) {
      ((i = i || "#f0f0f0"), (n = n || "#ffffff"));
      var s = this.hexToRgb((e = e || "#1a73d9"));
      try {
        if ("" === (t = Number(t))) throw "is empty";
        if (isNaN(t)) throw "is not a number";
      } catch (e) {
        t = "err";
      }
      100 < t && (t = 100);
      var o =
          "rgb(" +
          parseInt(s.r, 10) +
          "," +
          parseInt(s.g, 10) +
          "," +
          parseInt(s.b, 10) +
          ")",
        r = a("<div/>", { class: "joubel-progress-circle-wrapper" }),
        e = a("<div/>", {
          class: "joubel-progress-circle-active-border",
        }).appendTo(r),
        s = a("<div/>", { class: "joubel-progress-circle-circle" }).appendTo(e);
      a("<span/>", {
        text: t + "%",
        class: "joubel-progress-circle-percentage",
      }).appendTo(s);
      t *= 3.6;
      return (
        (t <= 180
          ? e.css(
              "background-image",
              "linear-gradient(" +
                (90 + t) +
                "deg, transparent 50%, " +
                i +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
          : e.css(
              "background-image",
              "linear-gradient(" +
                (t - 90) +
                "deg, transparent 50%, " +
                o +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
        )
          .css("border", "2px solid" + n)
          .css("background-color", o),
        (this.$activeBorder = e),
        (this.$backgroundCircle = s),
        (this.$wrapper = r),
        this.initResizeFunctionality(),
        r
      );
    }
    return (
      (e.prototype.initResizeFunctionality = function () {
        var e = this;
        (a(window).resize(function () {
          setTimeout(function () {
            e.resize();
          });
        }),
          setTimeout(function () {
            e.resize();
          }, 0));
      }),
      (e.prototype.resize = function () {
        var e,
          t,
          i,
          n = this.$wrapper.parent();
        void 0 !== n &&
          n &&
          ((i = parseInt(n.css("font-size"), 10)),
          (t =
            (e =
              parseInt(i / 4.5, 10) % 2 == 0
                ? parseInt(i / 4.5, 10) + 4
                : parseInt(i / 4.5, 10) + 5) / 2),
          this.$activeBorder.css({
            width: (n = 3.75 * i),
            height: (i = 3.75 * i),
          }),
          this.$backgroundCircle.css({
            width: n - e,
            height: i - e,
            top: t,
            left: t,
          }));
      }),
      (e.prototype.hexToRgb = function (e) {
        e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
        return e
          ? {
              r: parseInt(e[1], 16),
              g: parseInt(e[2], 16),
              b: parseInt(e[3], 16),
            }
          : null;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).SimpleRoundedButton = (function (i) {
    return function (e) {
      var t = i("<div>", {
        class: "joubel-simple-rounded-button",
        title: e,
        role: "button",
        tabindex: "0",
      }).keydown(function (e) {
        -1 !== [32, 13].indexOf(e.which) &&
          (i(this).click(), e.preventDefault());
      });
      return (
        i("<span>", {
          class: "joubel-simple-rounded-button-text",
          html: e,
        }).appendTo(t),
        t
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSpeechBubble = (function (o) {
    var r,
      a,
      l,
      h,
      c,
      u,
      d = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function p(e) {
      var t = e.closest(".h5p-frame");
      return (t = !t.length ? e.closest(".h5p-container") : t);
    }
    function f() {
      g(r, a, u, l, h);
    }
    function g(e, t, i, n, s) {
      var o = (function (e, t) {
          ((e = e[0].getBoundingClientRect()),
            (t = t[0].getBoundingClientRect()));
          return {
            top: t.top - e.top,
            right: e.right - t.right,
            bottom: e.bottom - t.bottom,
            left: t.left - e.left,
            innerWidth: t.width,
            innerHeight: t.height,
            outerWidth: e.width,
            outerHeight: e.height,
          };
        })(p(t), t),
        r = o.bottom > o.top ? "bottom" : "top",
        a = 0.9 * o.outerWidth,
        i = i < a ? i : a,
        a = (function (e, t) {
          var i = {},
            n = e / 2;
          ((i.top = t.top + t.innerHeight),
            (i.bottom = t.bottom + t.innerHeight + 9),
            t.left < n
              ? (i.left = 3)
              : t.left + n > t.outerWidth
                ? (i.left = t.outerWidth - e - 3)
                : (i.left = t.left - n + t.innerWidth / 2));
          return i;
        })(i, o),
        t = (function (e, t, i, n) {
          var s = {},
            e = e - 20;
          ((s.left = i.left - t.left + n / 2 - 6), s.left < 9 && (s.left = 9));
          s.left > e && (s.left = e);
          return ((s.top = -6), (s.bottom = -6), s);
        })(i, a, o, t.width());
      e.css(
        ((e = i),
        (i = a),
        (a = 16),
        "top" === r
          ? {
              width: e + "px",
              bottom: i.bottom + "px",
              left: i.left + "px",
              fontSize: a + "px",
              top: "",
            }
          : {
              width: e + "px",
              top: i.top + "px",
              left: i.left + "px",
              fontSize: a + "px",
              bottom: "",
            }),
      );
      ((t = t),
        (t =
          "top" === r
            ? { bottom: t.bottom + "px", left: t.left + "px", top: "" }
            : { top: t.top + "px", left: t.left + "px", bottom: "" }));
      (n.css(t), s.css(t));
    }
    H5P.externalDispatcher.on("domHidden", function (e) {
      void 0 !== r && 0 !== e.data.$dom.find(a).length && m();
    });
    var m = function () {
      (H5P.$body.off("mousedown.speechBubble"),
        H5P.$window.off("resize", "", f),
        a.parents(".h5p-dialog").off("mousedown.speechBubble"),
        d && H5P.$body.css("cursor", ""),
        void 0 !== r &&
          (r.removeClass("show"),
          clearTimeout(c),
          (c = setTimeout(function () {
            (r.remove(), (r = void 0));
          }, 500))));
    };
    function v(e) {
      e.target !== a[0] && (m(), (a = void 0));
    }
    return function (e, t, i) {
      ((u = i = i || 400),
        (a = e),
        (this.isCurrent = function (e) {
          return e.is(a);
        }),
        (this.remove = function () {
          m();
        }),
        void 0 !== r && m());
      var n,
        s = p(e);
      return (
        (n = r) &&
          (clearTimeout(c),
          n.removeClass("show"),
          setTimeout(function () {
            n && (n.remove(), (n = void 0));
          }, 500)),
        (l = o('<div class="joubel-speech-bubble-tail"></div>')),
        (h = o('<div class="joubel-speech-bubble-inner-tail"></div>')),
        (t = o(
          '<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">' +
            t +
            "</div></div>",
        ).prepend(h)),
        (r = o('<div class="joubel-speech-bubble" aria-live="assertive">')
          .append([l, t])
          .appendTo(s)),
        setTimeout(function () {
          r.addClass("show");
        }, 0),
        g(r, a, i, l, h),
        H5P.$body.on("mousedown.speechBubble", v),
        H5P.$window.on("resize", "", f),
        e.parents(".h5p-dialog").on("mousedown.speechBubble", v),
        d && H5P.$body.css("cursor", "pointer"),
        this
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelThrobber = (function (e) {
    return function () {
      return e("<div/>", { class: "h5p-throbber" });
    };
  })(H5P.jQuery)),
  /*!@license H5P.JoubelUI-1.3/js/joubel-tip.js by Joubel licensed under unknown license*/ (H5P.JoubelTip =
    (function (a) {
      var l = a("<div/>");
      return function (t, i) {
        var n,
          e = l.html(t).text().trim();
        if ("" !== e) {
          i = a.extend(
            { tipLabel: e, helpIcon: !1, showSpeechBubble: !0, tabcontrol: !1 },
            i,
          );
          var s = a("<div/>", {
            class:
              "joubel-tip-container" + (i.showSpeechBubble ? "" : " be-quiet"),
            "aria-label": i.tipLabel,
            "aria-expanded": !1,
            role: "button",
            tabindex: i.tabcontrol ? -1 : 0,
            click: function (e) {
              (o(), e.preventDefault());
            },
            keydown: function (e) {
              32 === e.which || 13 === e.which
                ? (o(), e.stopPropagation(), e.preventDefault())
                : o(!1);
            },
            html:
              '<span class="joubel-icon-tip-normal ' +
              (i.helpIcon ? " help-icon" : "") +
              '"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>',
          });
          const r = a("<div>", {
            class: "hidden-but-read",
            "aria-live": "polite",
            appendTo: s,
          });
          var o = function (e) {
            void 0 !== n && n.isCurrent(s)
              ? (n.remove(),
                (n = void 0),
                s.attr("aria-expanded", !1),
                r.html(""))
              : !1 !== e &&
                i.showSpeechBubble &&
                ((n = H5P.JoubelSpeechBubble(s, t)),
                s.attr("aria-expanded", !0),
                r.html(t));
          };
          return s;
        }
      };
    })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSlider = (function (t) {
    function e(e) {
      (H5P.EventDispatcher.call(this),
        (this.$slider = t(
          "<div>",
          t.extend({ class: "h5p-joubel-ui-slider" }, e),
        )),
        (this.$slides = []),
        (this.currentIndex = 0),
        (this.numSlides = 0));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.addSlide = function (e) {
        (e
          .addClass("h5p-joubel-ui-slide")
          .css({ left: 100 * this.numSlides + "%" }),
          this.$slider.append(e),
          this.$slides.push(e),
          this.numSlides++,
          1 === this.numSlides && e.addClass("current"));
      }),
      (e.prototype.attach = function (e) {
        e.append(this.$slider);
      }),
      (e.prototype.move = function (e) {
        var t = this;
        (0 === e && t.trigger("first-slide"),
          e + 1 === t.numSlides && t.trigger("last-slide"),
          t.trigger("move"));
        var i = t.$slides[this.currentIndex];
        (H5P.Transition.onTransitionEnd(this.$slider, function () {
          (i.removeClass("current"), t.trigger("moved"));
        }),
          this.$slides[e].addClass("current"));
        var n = "translateX(" + 100 * -e + "%)";
        (this.$slider.css({
          "-webkit-transform": n,
          "-moz-transform": n,
          "-ms-transform": n,
          transform: n,
        }),
          (this.currentIndex = e));
      }),
      (e.prototype.remove = function () {
        this.$slider.remove();
      }),
      (e.prototype.next = function () {
        this.currentIndex + 1 >= this.numSlides ||
          this.move(this.currentIndex + 1);
      }),
      (e.prototype.previous = function () {
        this.move(this.currentIndex - 1);
      }),
      (e.prototype.first = function () {
        this.move(0);
      }),
      (e.prototype.last = function () {
        this.move(this.numSlides - 1);
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelScoreBar = (function (r) {
    var a = 0;
    return function (e, t, i, n) {
      var s = this;
      function o(e) {
        return t ? t.replace(":num", e).replace(":total", s.maxScore) : "";
      }
      ((s.maxScore = e),
        (s.score = 0),
        a++,
        (s.STAR_MARKUP =
          '<svg tabindex="-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63.77 53.87" aria-hidden="true" focusable="false"><title>star</title><filter tabindex="-1" id="h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          '" x0="-50%" y0="-50%" width="200%" height="200%"><feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur><feOffset dy="2" dx="4"></feOffset><feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite><feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur><feOffset dy="-2" dx="-4"></feOffset><feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="firstfilter" operator="over"></feComposite></filter><path tabindex="-1" class="h5p-joubelui-score-bar-star-shadow" d="M35.08,43.41V9.16H20.91v0L9.51,10.85,9,10.93C2.8,12.18,0,17,0,21.25a11.22,11.22,0,0,0,3,7.48l8.73,8.53-1.07,6.16Z"/><g tabindex="-1"><path tabindex="-1" class="h5p-joubelui-score-bar-star-border" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" class="h5p-joubelui-score-bar-star-fill" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" filter="url(#h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          ')" class="h5p-joubelui-score-bar-star-fill-full-score" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/></g></svg>'),
        (s.appendTo = function (e) {
          s.$scoreBar.appendTo(e);
        }),
        (s.setScore = function (e) {
          e !== s.score &&
            ((s.score = e > s.maxScore ? s.maxScore : e), s.updateVisuals());
        }),
        (s.incrementScore = function (e) {
          s.setScore(s.score + (e || 1));
        }),
        (s.setMaxScore = function (e) {
          s.maxScore = e;
        }),
        (s.updateVisuals = function () {
          (s.$progress.html(o(s.score)),
            s.$scoreCounter.text(s.score),
            s.$maxScore.text(s.maxScore),
            setTimeout(function () {
              (s.$progress.css({ width: (s.score / s.maxScore) * 100 + "%" }),
                H5P.Transition.onTransitionEnd(
                  s.$progress,
                  function () {
                    (s.$scoreBar.toggleClass(
                      "h5p-joubelui-score-bar-full-score",
                      s.score === s.maxScore,
                    ),
                      s.$scoreBar.toggleClass(
                        "h5p-joubelui-score-bar-animation-active",
                        s.score === s.maxScore,
                      ),
                      s.$scoreBar.one("animationend", function () {
                        s.$scoreBar.removeClass(
                          "h5p-joubelui-score-bar-animation-active",
                        );
                      }));
                  },
                  600,
                ));
            }, 300));
        }),
        (s.reset = function () {
          s.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score");
        }),
        (function () {
          s.$scoreBar = r("<div>", { class: "h5p-joubelui-score-bar" });
          var e = r("<div>", {
            class: "h5p-joubelui-score-bar-visuals",
            appendTo: s.$scoreBar,
          });
          ((s.$progressWrapper = r("<div>", {
            class: "h5p-joubelui-score-bar-progress-wrapper",
            appendTo: e,
          })),
            (s.$progress = r("<div>", {
              class: "h5p-joubelui-score-bar-progress",
              html: o(s.score),
              appendTo: s.$progressWrapper,
            })),
            r("<div>", {
              class: "h5p-joubelui-score-bar-star",
              html: s.STAR_MARKUP,
            }).appendTo(e));
          e = r("<div>", {
            class: "h5p-joubelui-score-numeric",
            appendTo: s.$scoreBar,
            "aria-hidden": !0,
          });
          ((s.$scoreCounter = r("<span>", {
            class:
              "h5p-joubelui-score-number h5p-joubelui-score-number-counter",
            text: 0,
            appendTo: e,
          })),
            r("<span>", {
              class: "h5p-joubelui-score-number-separator",
              text: "/",
              appendTo: e,
            }),
            (s.$maxScore = r("<span>", {
              class: "h5p-joubelui-score-number h5p-joubelui-score-max",
              text: s.maxScore,
              appendTo: e,
            })),
            i &&
              (H5P.JoubelUI.createTip(i, {
                tipLabel: n || i,
                helpIcon: !0,
              }).appendTo(s.$scoreBar),
              s.$scoreBar.addClass("h5p-score-bar-has-help")));
        })());
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressbar = (function (i) {
    function e(e, t) {
      H5P.EventDispatcher.call(this);
      ((this.options = i.extend({ progressText: "Slide :num of :total" }, t)),
        (this.currentStep = 0),
        (this.steps = e),
        (this.$progressbar = i("<div>", { class: "h5p-joubelui-progressbar" })),
        (this.$background = i("<div>", {
          class: "h5p-joubelui-progressbar-background",
        }).appendTo(this.$progressbar)));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.updateAria = function () {
        var e;
        this.options.disableAria ||
          (this.$currentStatus ||
            (this.$currentStatus = i("<div>", {
              class: "h5p-joubelui-progressbar-slide-status-text",
              "aria-live": "assertive",
            }).appendTo(this.$progressbar)),
          (e = this.options.progressText
            .replace(":num", this.currentStep)
            .replace(":total", this.steps)),
          this.$currentStatus.html(e));
      }),
      (e.prototype.appendTo = function (e) {
        this.$progressbar.appendTo(e);
      }),
      (e.prototype.setProgress = function (e) {
        e > this.steps ||
          e < 0 ||
          ((this.currentStep = e),
          this.$background.css({
            width: (this.currentStep / this.steps) * 100 + "%",
          }),
          this.updateAria());
      }),
      (e.prototype.next = function () {
        this.setProgress(this.currentStep + 1);
      }),
      (e.prototype.reset = function () {
        this.setProgress(0);
      }),
      (e.prototype.isLastStep = function () {
        return this.steps === this.currentStep;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelUI = (function (i) {
    function e() {}
    var t;
    return (
      (e.createTip = function (e, t) {
        return new H5P.JoubelTip(e, t);
      }),
      (e.createMessageDialog = function (e, t) {
        return new H5P.JoubelMessageDialog(e, t);
      }),
      (e.createHelpTextDialog = function (e, t, i) {
        return new H5P.JoubelHelpTextDialog(e, t, i);
      }),
      (e.createProgressCircle = function (e, t, i, n) {
        return new H5P.JoubelProgressCircle(e, t, i, n);
      }),
      (e.createThrobber = function () {
        return new H5P.JoubelThrobber();
      }),
      (e.createSimpleRoundedButton = function (e) {
        return new H5P.SimpleRoundedButton(e);
      }),
      (e.createSlider = function (e) {
        return new H5P.JoubelSlider(e);
      }),
      (e.createScoreBar = function (e, t, i, n) {
        return new H5P.JoubelScoreBar(e, t, i, n);
      }),
      (e.createProgressbar = function (e, t) {
        return new H5P.JoubelProgressbar(e, t);
      }),
      (e.createButton = function (e) {
        var t = "button";
        return (
          e.href ? (t = "a") : (e.type = "button"),
          e.class
            ? (e.class += " h5p-joubelui-button")
            : (e.class = "h5p-joubelui-button"),
          i("<" + t + "/>", e)
        );
      }),
      H5P.isFramed &&
        !H5P.hasiOSiframeScrollFix &&
        /iPad|iPhone|iPod/.test(navigator.userAgent) &&
        ((H5P.hasiOSiframeScrollFix = !0),
        (t = HTMLElement.prototype.focus),
        (HTMLElement.prototype.focus = function () {
          (this instanceof HTMLAnchorElement ||
            this instanceof HTMLInputElement ||
            this instanceof HTMLSelectElement ||
            this instanceof HTMLTextAreaElement ||
            this instanceof HTMLButtonElement ||
            this instanceof HTMLIFrameElement ||
            this instanceof HTMLAreaElement) &&
            !this.getAttribute("role") &&
            t.call(this);
        })),
      e
    );
  })(H5P.jQuery)),
  /*!@license H5P.Question-1.5/scripts/question.js by Joubel licensed under MIT*/ (H5P.Tooltip =
    H5P.Tooltip || function () {}),
  (H5P.Question = (function (q, e, W) {
    function t(s) {
      var c = this;
      (e.call(c),
        (c.order = [
          "video",
          "image",
          "audio",
          "introduction",
          "content",
          "explanation",
          "feedback",
          "scorebar",
          "buttons",
          "read",
        ]));
      function u(e, t) {
        ((y[e] = {}),
          (e = y[e].$element = q("<div/>", { class: "h5p-question-" + e })),
          t && e[t instanceof q ? "append" : "html"](t));
      }
      function d(e, t) {
        t instanceof q
          ? y[e].$element.html("").append(t)
          : y[e].$element.html(t);
      }
      function p() {
        if (void 0 !== y.buttons) {
          clearTimeout(l);
          for (var e = 0; e < P.length; e++)
            (I(w, P[e].id, _, y.buttons.$element), (_[P[e].id].isVisible = !0));
          for (var t = 0, i = !(P = []), n = 0; n < x.length; n++) {
            var s = _[x[n].id];
            (s.isVisible && (t += 1), s.$element.is(":focus") && (i = !0));
          }
          var o = 150;
          (y.feedback &&
            y.feedback.$element.hasClass("h5p-question-popup") &&
            (o = 0),
            t === y.buttons.$element.children().length
              ? (R(y.buttons), A(i))
              : (A(i),
                y.buttons.$element.is(":empty") ||
                  (F(y.buttons),
                  E(y.buttons.$element),
                  (l = setTimeout(function () {
                    c.trigger("resize");
                  }, o))),
                N()),
            (r = void 0));
        }
      }
      function a() {
        var e = y.image.$element;
        (clearTimeout(i),
          e.addClass("animatable"),
          (i =
            ((T = T
              ? (q(this).attr("aria-expanded", !0),
                e.addClass("h5p-question-image-fill-width"),
                !1)
              : (q(this).attr("aria-expanded", !1),
                e.removeClass("h5p-question-image-fill-width"),
                !0)),
            setTimeout(function () {
              c.trigger("resize");
            }, 600))));
      }
      function n(e, t, i) {
        for (var n = 0; n < i.length; n++) if (i[n][t] === e) return n;
        return -1;
      }
      var f,
        g,
        m,
        v,
        r,
        l,
        t,
        i,
        b,
        o,
        h,
        y = {},
        _ = {},
        w = [],
        x = [],
        P = [],
        C = !1,
        k = { disableFeedback: !1, disableReadSpeaker: !1 },
        T = !0,
        H = !1,
        D = !1,
        I = function (e, t, i, n) {
          for (var s = 0; s < e.length; s++)
            if (e[s] === t) {
              for (
                ;
                0 < s && (void 0 === i[e[s - 1]] || !i[e[s - 1]].isVisible);

              )
                s--;
              (0 === s
                ? i[t].$element.prependTo(n)
                : i[t].$element.insertAfter(i[e[s - 1]].$element),
                (i[t].isVisible = !0));
              break;
            }
        },
        S = function (e, t) {
          var i,
            n,
            s,
            o,
            r = e.parent(),
            a = e.siblings(".h5p-question-feedback-tail"),
            l = e.outerWidth(),
            h = E(e),
            c = !1,
            u = r.height() / 2 - h / 2,
            d = r.width() / 2 - l / 2,
            p = 0,
            f = 0,
            g = 0;
          (null != t
            ? ((i = t[0].offsetTop < 15),
              (n = t[0].offsetTop + t.height() > r.height() - 15),
              (s = t[0].offsetLeft < 15),
              (o = t[0].offsetLeft + t.width() > r.width() - 15),
              (d = t[0].offsetLeft - l / 2 + t.width() / 2),
              (u = t[0].offsetTop - h - 15),
              (p = d + l / 2 - a.width() / 2),
              (f = u + h - a.height() / 2),
              (g = 225),
              h + 15 > t[0].offsetTop &&
                ((f = (u = t[0].offsetTop + t.height() + 15) - a.height() / 2),
                (g = 45)),
              (d = d < 0 ? 0 : d) + l > r.width() && (d = r.width() - l),
              i && (s || o)
                ? ((d = t[0].offsetLeft + (s ? t.width() : -l)),
                  (u = t[0].offsetTop + t.height()),
                  (c = !0))
                : n && (s || o)
                  ? ((d = t[0].offsetLeft + (s ? t.width() : -l)),
                    (u = t[0].offsetTop - h),
                    (c = !0))
                  : i ||
                    n ||
                    ((s || o) &&
                      ((u = t[0].offsetTop - h / 2 + t.width() / 2),
                      (d = t[0].offsetLeft + (s ? t.width() + 15 : -l - 15)) < 0
                        ? (c = !(d = 0))
                        : ((p = d + (s ? -a.width() / 2 : l - a.width() / 2)),
                          (f = u + h / 2 - a.height() / 2),
                          (g = s ? 315 : 135)))),
              u + h > r.height() &&
                ((u = r.height() - h),
                h > r.height() - (t[0].offsetTop + t.height() + 15) &&
                  (c = !0)))
            : (c = !0),
            e.css({ top: (u = u < 0 ? 0 : u), left: d }),
            a.css({ top: f, left: p }),
            c
              ? a.hide()
              : a
                  .css({ left: p, top: f, transform: "rotate(" + g + "deg)" })
                  .show());
        },
        E = function (e) {
          if (e.is(":visible")) {
            var t = e.hasClass("h5p-question-popup"),
              i = e
                .clone()
                .css({
                  position: "absolute",
                  "max-height": "none",
                  width: t ? "" : "100%",
                })
                .appendTo(e.parent()),
              n =
                parseFloat(e.css("margin-left")) +
                parseFloat(e.css("margin-right")),
              t = i.css("width") ? i.css("width") : "100%";
            i.css("width", "calc(" + t + " - " + n + "px)");
            ((t = Math.round(i.get(0).getBoundingClientRect().height)),
              (n = parseFloat(e.css("fontSize"))));
            return (
              e.css("max-height", t / n + "em"),
              i.remove(),
              0 < t &&
                y.buttons &&
                y.buttons.$element === e &&
                (F(y.buttons), setTimeout(N, 150)),
              t
            );
          }
          e.css("max-height", "none");
        },
        A = function (e) {
          for (var t = 0; t < x.length; t++) M(x[t].id);
          ((x = []), e && c.focusButton());
        },
        M = function (e) {
          (_[e].$element.detach(), (_[e].isVisible = !1));
        },
        O = function (e, t, i) {
          if (
            ((t = t || 0),
            (i = i || 5),
            e && e instanceof q && document !== e.get(0) && !(i <= t))
          )
            return "auto" === e.css("overflow-y") ? e : O(e.parent(), t + 1, i);
        },
        N = function () {
          var e;
          _ &&
            y.buttons &&
            ((e = function () {
              if (y.buttons.$element.is(":visible")) {
                var e,
                  t = { max: 0, min: 0, current: 0 };
                for (e in _) {
                  var i = _[e];
                  i.isVisible &&
                    ($(_[e]),
                    (t.max += i.width.max),
                    (t.min += i.width.min),
                    (t.current += i.isTruncated ? i.width.min : i.width.max));
                }
                function n(e) {
                  return t.max < e
                    ? (t.max !== t.current && j(t.current, e), !0)
                    : t.min < e && ((t.current > e ? z : j)(t.current, e), !0);
                }
                (L(!1),
                  n(Math.floor(y.buttons.$element.width()) - 1) ||
                    (L(!0), n(Math.floor(y.buttons.$element.width()) - 1)));
              }
            }),
            y.buttons.$element.is(":visible")
              ? e()
              : (t && clearTimeout(t),
                (t = setTimeout(function () {
                  ((t = void 0), e());
                }, 0))));
        },
        L = function (e) {
          y.scorebar &&
          y.scorebar.$element &&
          y.scorebar.$element.hasClass("h5p-question-visible")
            ? (y.buttons.$element.addClass("has-scorebar"),
              y.buttons.$element.toggleClass("wrap", e),
              y.scorebar.$element.toggleClass("full-width", e))
            : y.buttons.$element.removeClass("has-scorebar");
        },
        z = function (e, t) {
          for (var i = w.length - 1; 0 <= i; i--) {
            var n = w[i],
              s = _[n];
            if (!s.isTruncated && s.isVisible) {
              var o = s.$element;
              e -= s.width.max - s.width.min;
              n = o.text();
              if (
                (o.attr("data-tooltip", n),
                s.ariaLabel || o.attr("aria-label", n),
                o.html("").addClass("truncated"),
                (s.isTruncated = !0),
                e <= t)
              )
                return;
            }
          }
        },
        j = function (e, t) {
          for (var i = 0; i < w.length; i++) {
            var n = w[i],
              n = _[n];
            if (n.isTruncated && n.isVisible) {
              if (t < (e += n.width.max - n.width.min + 1)) return;
              (n.$element.html(n.text),
                n.$element.removeAttr("data-tooltip"),
                n.ariaLabel || n.$element.removeAttr("aria-label"),
                n.$element.removeClass("truncated"),
                (n.isTruncated = !1));
            }
          }
        },
        F = function (e) {
          (e.$element.addClass("h5p-question-visible"), (e.isVisible = !0));
        },
        R = function (e) {
          (e.$element.css("max-height", ""),
            (e.isVisible = !1),
            setTimeout(function () {
              e.isVisible || e.$element.removeClass("h5p-question-visible");
            }, 150));
        };
      ((c.setBehaviour = function (e) {
        q.extend(k, e);
      }),
        (c.setVideo = function (e) {
          ((y.video = {
            $element: q("<div/>", { class: "h5p-question-video" }),
          }),
            D && e.params.playback && (e.params.playback.autoplay = !1),
            e.params.visuals || (e.params.visuals = {}),
            (e.params.visuals.fit = !1),
            (y.video.instance = H5P.newRunnable(
              e,
              c.contentId,
              y.video.$element,
              !0,
            )));
          var t = !1;
          return (
            y.video.instance.on("resize", function () {
              ((t = !0), c.trigger("resize"), (t = !1));
            }),
            c.on("resize", function () {
              t || y.video.instance.trigger("resize");
            }),
            c
          );
        }),
        (c.setAudio = function (e) {
          return (
            (e.params = e.params || {}),
            (y.audio = {
              $element: q("<div/>", { class: "h5p-question-audio" }),
            }),
            D
              ? (e.params.autoplay = !1)
              : "transparent" === e.params.playerMode &&
                (e.params.autoplay = !0),
            (y.audio.instance = H5P.newRunnable(
              e,
              c.contentId,
              y.audio.$element,
              !0,
            )),
            y.audio.instance.audio &&
              (y.audio.instance.audio.style.height = ""),
            c
          );
        }),
        (c.pause = function () {
          (y.video && y.video.isVisible && y.video.instance.pause(),
            y.audio && y.audio.isVisible && y.audio.instance.pause());
        }),
        (c.play = function () {
          (y.video && y.video.isVisible && y.video.instance.play(),
            y.audio && y.audio.isVisible && y.audio.instance.play());
        }),
        (c.disableAutoPlay = function () {
          D = !0;
        }),
        (c.massageAttributeOutput = function (e) {
          e = new DOMParser().parseFromString(e, "text/html");
          const t = document.createElement("div");
          return (
            (t.innerHTML = e.documentElement.textContent),
            t.textContent || t.innerText || ""
          );
        }),
        (c.setImage = function (e, t) {
          ((t = t || {}),
            (y.image = {}),
            (y.image.$element = q("<div/>", {
              class: "h5p-question-image h5p-question-image-fill-width",
            })));
          var i = q("<div/>", {
              class: "h5p-question-image-wrap",
              appendTo: y.image.$element,
            }),
            n = q("<img/>", {
              src: H5P.getPath(e, c.contentId),
              alt: void 0 === t.alt ? "" : c.massageAttributeOutput(t.alt),
              title:
                void 0 === t.title ? "" : c.massageAttributeOutput(t.title),
              on: {
                load: function () {
                  (c.trigger("imageLoaded", this), c.trigger("resize"));
                },
              },
              appendTo: i,
            });
          if (!t.disableImageZooming) {
            const r = () => {
              var e =
                "true" === i.attr("aria-expanded")
                  ? t.minimizeImage
                  : t.expandImage;
              i.attr("aria-label", e + " " + t.alt);
            };
            var s = !1;
            return (
              c.on("resize", function () {
                !s &&
                  n.is(":visible") &&
                  (i
                    .addClass("h5p-question-image-scalable")
                    .attr("aria-expanded", !1)
                    .attr("role", "button")
                    .attr("tabIndex", "0")
                    .on("click", function (e) {
                      1 === e.which && (a.apply(this), r());
                    })
                    .on("keypress", function (e) {
                      32 === e.which &&
                        (e.preventDefault(), a.apply(this), r());
                    }),
                  r(),
                  y.image.$element.removeClass("h5p-question-image-fill-width"),
                  (s = !0));
              }),
              c
            );
          }
          n.css("maxHeight", "none");
          function o() {
            var e = y.image.$element.get(0).getBoundingClientRect().width;
            i.css({ "-webkit-transition": "none", transition: "none" });
            var t =
              2 *
              (i.get(0).getBoundingClientRect().left -
                y.image.$element.get(0).getBoundingClientRect().left);
            (n.get(0).naturalWidth >= e - t
              ? y.image.$element.addClass("h5p-question-image-fill-width")
              : y.image.$element.removeClass("h5p-question-image-fill-width"),
              i.css({ "-webkit-transition": "", transition: "" }));
          }
          n.is(":visible") ? o() : n.on("load", o);
        }),
        (c.setIntroduction = function (e) {
          return (u("introduction", e), c);
        }),
        (c.setContent = function (e, t) {
          return (
            u("content", e),
            t && t.class && y.content.$element.addClass(t.class),
            c
          );
        }),
        (c.read = function (e) {
          o &&
            (h ? (h += ("." === h.substr(-1, 1) ? " " : ". ") + e) : (h = e),
            o.html(h),
            setTimeout(function () {
              ((h = null), o.html(""));
            }, 100));
        }),
        (c.readFeedback = function () {
          var e;
          k.disableReadSpeaker ||
            !v ||
            !y.feedback ||
            !y.feedback.$element ||
            ((e = q(
              ".h5p-question-feedback-content-text",
              y.feedback.$element,
            )) &&
              e.html() &&
              e.html().length &&
              c.read(e.html()));
        }),
        (c.removeFeedback = function () {
          return (
            clearTimeout(b),
            y.feedback &&
              v &&
              ((v = !1),
              R(y.scorebar),
              R(y.feedback),
              (H = !0),
              (b = setTimeout(function () {
                (v ||
                  (y.feedback.$element.children().detach(),
                  y.scorebar.$element.children().detach(),
                  c.trigger("resize")),
                  (H = !1),
                  m.setScore(0));
              }, 150)),
              f && f.find(".h5p-question-feedback-tail").remove()),
            c
          );
        }),
        (c.setFeedback = function (e, t, i, n, s, o, r) {
          if (k.disableFeedback) return c;
          (p(),
            (g = null != o && null != o.click ? o.click : null),
            clearTimeout(b));
          var a = q("<div>", { class: "h5p-question-feedback-container" }),
            l = q("<div>", { class: "h5p-question-feedback-content" }).appendTo(
              a,
            );
          q("<div>", {
            class: "h5p-question-feedback-content-text",
            html: e,
          }).appendTo(l);
          var h = q("<div>", { class: "h5p-question-scorebar-container" });
          return (
            (m = void 0 === m ? W.createScoreBar(i, n, s, r) : m).appendTo(h),
            l.toggleClass("has-content", void 0 !== e && 0 < e.length),
            !k.disableReadSpeaker &&
              n &&
              c.read(
                n.replace(":num", t).replace(":total", i) + ". " + (e || ""),
              ),
            (v = !0),
            y.feedback
              ? (d("feedback", a), d("scorebar", h))
              : (u("feedback", a),
                u("scorebar", h),
                C &&
                  f &&
                  (I(c.order, "feedback", y, f), I(c.order, "scorebar", y, f))),
            F(y.feedback),
            F(y.scorebar),
            N(),
            null != o && 1 == o.showAsPopup
              ? ((function (e) {
                  var t = y.feedback.$element,
                    i = y.content.$element,
                    n = null != g ? g.$element : null;
                  (t.appendTo(i).addClass("h5p-question-popup"),
                    y.scorebar && y.scorebar.$element.appendTo(t),
                    i.addClass("h5p-has-question-popup"));
                  var s = q("<div/>", { class: "h5p-question-feedback-tail" })
                      .hide()
                      .appendTo(i),
                    e = q("<div/>", {
                      class: "h5p-question-feedback-close",
                      tabindex: 0,
                      title: e,
                      on: {
                        click: function (e) {
                          (t.remove(), s.remove(), e.preventDefault());
                        },
                        keydown: function (e) {
                          switch (e.which) {
                            case 13:
                            case 32:
                              (t.remove(), s.remove(), e.preventDefault());
                          }
                        },
                      },
                    })
                      .hide()
                      .appendTo(t);
                  (null != n &&
                    (n.hasClass("correct")
                      ? (t.addClass("h5p-question-feedback-correct"),
                        e.show(),
                        y.buttons.$element.hide())
                      : y.buttons.$element.appendTo(y.feedback.$element)),
                    S(t, n));
                })(o.closeText),
                m.setScore(t))
              : (b = setTimeout(function () {
                  var e;
                  (E(y.feedback.$element),
                    E(y.scorebar.$element),
                    (H = !0),
                    !f ||
                      (f.hasClass("h5p-standalone") && !H5P.isFullscreen) ||
                      ((e = O(f)) &&
                        e.animate({ scrollTop: f.css("height") }, "slow")),
                    (b = setTimeout(function () {
                      ((H = !1), c.trigger("resize"), m.setScore(t));
                    }, 150)));
                }, 0)),
            c
          );
        }),
        (c.updateFeedbackContent = function (e, t) {
          return (
            y.feedback &&
              y.feedback.$element &&
              (t &&
                (e =
                  q(
                    ".h5p-question-feedback-content",
                    y.feedback.$element,
                  ).html() +
                  " " +
                  e),
              q(".h5p-question-feedback-content", y.feedback.$element)
                .html(e)
                .addClass("has-content"),
              E(y.feedback.$element),
              setTimeout(c.trigger.bind(c, "resize"), 150)),
            c
          );
        }),
        (c.setExplanation = function (e, t) {
          return (
            e
              ? ((e = new H5P.Question.Explainer(t, e)),
                y.explanation
                  ? d("explanation", e.getElement())
                  : (u("explanation", e.getElement()),
                    C && f && I(c.order, "explanation", y, f)))
              : y.explanation && y.explanation.$element.children().detach(),
            c
          );
        }),
        (c.hasButton = function (e) {
          return void 0 !== _[e];
        }),
        (c.addButton = function (e, t, i, n, s, o) {
          if (_[e]) return c;
          (void 0 === y.buttons &&
            (u("buttons"), C && I(c.order, "buttons", y, f)),
            ((o = o || {}).confirmationDialog = o.confirmationDialog || {}),
            (s = s || {}));
          function r() {
            o.confirmationDialog.enable && a
              ? (o.confirmationDialog.$parentElement ||
                  y.popups.$element.removeClass("hidden"),
                a.show(h.position().top))
              : i();
          }
          var a = c.addConfirmationDialogToButton(o.confirmationDialog, i);
          (o.contentData &&
            o.contentData.standalone &&
            (o.contentData.isScoringEnabled ||
              o.contentData.isReportingEnabled) &&
            o.textIfSubmitting &&
            (t = o.textIfSubmitting),
            (_[e] = {
              isTruncated: !1,
              text: t,
              isVisible: !1,
              ariaLabel: s["aria-label"],
            }));
          var l = void 0 !== s.href,
            h = (_[e].$element = W.createButton(
              q.extend(
                {
                  class: "h5p-question-" + e,
                  html: t,
                  on: {
                    click: function (e) {
                      (r(), l && e.preventDefault());
                    },
                  },
                },
                s,
              ),
            ));
          return (
            w.push(e),
            H5P.Tooltip(h.get(0), { tooltipSource: "data-tooltip" }),
            l &&
              h.on("keypress", function (e) {
                32 === e.which && (r(), e.preventDefault());
              }),
            (void 0 !== n && !n) ||
              (h.appendTo(y.buttons.$element),
              (_[e].isVisible = !0),
              F(y.buttons)),
            c
          );
        }));
      var $ = function (e) {
        var t = e.$element,
          t = t
            .clone()
            .css({
              position: "absolute",
              "white-space": "nowrap",
              "max-width": "none",
            })
            .removeClass("truncated")
            .html(e.text)
            .appendTo(t.parent());
        ((e.width = {
          max: Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          ),
        }),
          t.html("").addClass("truncated"),
          (e.width.min = Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          )),
          t.remove());
      };
      ((c.addConfirmationDialogToButton = function (t, e) {
        if ((t = t || {}).enable) {
          var i = new H5P.ConfirmationDialog({
            instance: t.instance,
            headerText: t.l10n.header,
            dialogText: t.l10n.body,
            cancelText: t.l10n.cancelLabel,
            confirmText: t.l10n.confirmLabel,
          });
          if (t.$parentElement) {
            const n = t.$parentElement.get(0);
            let e;
            (n.classList.contains("h5p-content") &&
              (e = n.querySelector(".h5p-container")),
              i.appendTo(e ?? n));
          } else
            (void 0 === y.popups &&
              (u("popups"),
              C && I(c.order, "popups", y, f),
              y.popups.$element.addClass("hidden"),
              c.order.push("popups")),
              i.appendTo(y.popups.$element.get(0)));
          return (
            i.on("confirmed", function () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                e(),
                c.trigger("confirmed"));
            }),
            i.on("canceled", function () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                c.trigger("canceled"));
            }),
            i
          );
        }
      }),
        (c.showButton = function (e, t) {
          var i = -1 !== n(e, "id", x);
          if (void 0 === _[e] || (!0 === _[e].isVisible && !i)) return c;
          t = t || 0;
          i = n(e, "id", P);
          if (-1 !== i) return (P[i].priority < t && (P[i].priority = t), c);
          i = n(e, "id", x);
          return (
            -1 !== i
              ? x[i].priority <= t &&
                (x.splice(i, 1), P.push({ id: e, priority: t }))
              : _[e].$element.is(":visible") || P.push({ id: e, priority: t }),
            (r = r || setTimeout(p, 0)),
            c
          );
        }),
        (c.hideButton = function (e, t) {
          var i = -1 !== n(e, "id", P);
          if (void 0 === _[e] || (!1 === _[e].isVisible && !i)) return c;
          t = t || 0;
          i = n(e, "id", x);
          if (-1 !== i) return (x[i].priority < t && (x[i].priority = t), c);
          i = n(e, "id", P);
          return (
            -1 !== i
              ? P[i].priority <= t &&
                (P.splice(i, 1), x.push({ id: e, priority: t }))
              : _[e].$element.is(":visible")
                ? x.push({ id: e, priority: t })
                : M(e),
            (r = r || setTimeout(p, 0)),
            c
          );
        }),
        (c.focusButton = function (e) {
          if (void 0 === e)
            for (var t = 0; t < w.length; t++) {
              var i = _[w[t]];
              if (i && i.isVisible) {
                i.$element.focus();
                break;
              }
            }
          else _[e] && _[e].$element.is(":visible") && _[e].$element.focus();
          return c;
        }),
        (c.toggleReadSpeaker = function (e) {
          k.disableReadSpeaker = e || !k.disableReadSpeaker;
        }),
        (c.insertSectionAtElement = function (e, t) {
          return (
            void 0 === y[e] && u(e),
            (y[e].parent = t),
            C || I([e], e, y, t),
            c
          );
        }),
        (c.attach = function (e) {
          (c.isRoot() && c.setActivityStarted(),
            void 0 === f &&
              (void 0 !== c.registerDomElements &&
                (c.registerDomElements instanceof Function ||
                  "function" == typeof c.registerDomElements) &&
                c.registerDomElements(),
              (o = q("<div/>", {
                "aria-live": "polite",
                class: "h5p-hidden-read",
              })),
              u("read", o),
              c.trigger("registerDomElements")),
            (f = e).html("").addClass("h5p-question h5p-" + s));
          for (var t = [], i = 0; i < c.order.length; i++) {
            var n = c.order[i];
            y[n] &&
              (y[n].parent
                ? y[n].$element.appendTo(y[n].parent)
                : t.push(y[n].$element),
              (y[n].isVisible = !0));
          }
          return (
            e.append(t),
            c.trigger(
              "domChanged",
              {
                $target: e,
                library: c.libraryInfo.machineName,
                contentId: c.contentId,
                key: "newLibrary",
              },
              { bubbles: !0, external: !0 },
            ),
            (C = !0),
            c
          );
        }),
        (c.detachSections = function () {
          for (var e in ((C = !1), y)) y[e].$element.detach();
          return c;
        }),
        c.on("resize", function () {
          !H && y.feedback && v && E(y.feedback.$element);
          var e = y.feedback,
            t = g;
          (null != e &&
            null != e.$element &&
            null != t &&
            null != t.$element &&
            setTimeout(function () {
              S(e.$element, t.$element);
            }, 10),
            N());
        }));
    }
    return (
      (((t.prototype = Object.create(e.prototype)).constructor =
        t).determineOverallFeedback = function (e, t) {
        t = Math.floor(100 * t);
        for (var i = 0; i < e.length; i++) {
          var n = e[i],
            s = void 0 !== n.feedback && 0 !== n.feedback.trim().length;
          if (n.from <= t && n.to >= t && s) return n.feedback;
        }
        return "";
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher, H5P.JoubelUI)),
  /*!@license H5P.Question-1.5/scripts/explainer.js by Joubel licensed under MIT*/ (H5P.Question.Explainer =
    (function (l) {
      return function (o, r) {
        var a = this;
        (!(function () {
          ((a.$explanation = l("<div>", {
            class: "h5p-question-explanation-container",
          })),
            l("<div>", {
              class: "h5p-question-explanation-title",
              role: "heading",
              html: o,
              appendTo: a.$explanation,
            }));
          for (
            var e = l("<ul>", {
                class: "h5p-question-explanation-list",
                appendTo: a.$explanation,
              }),
              t = 0;
            t < r.length;
            t++
          ) {
            var i = r[t],
              n = l("<li>", {
                class: "h5p-question-explanation-item",
                appendTo: e,
              }),
              s = l("<div>", { class: "h5p-question-explanation-status" });
            (i.correct &&
              l("<span>", {
                class: "h5p-question-explanation-correct",
                html: i.correct,
                appendTo: s,
              }),
              i.wrong &&
                l("<span>", {
                  class: "h5p-question-explanation-wrong",
                  html: i.wrong,
                  appendTo: s,
                }),
              s.appendTo(n),
              i.text &&
                l("<div>", {
                  class: "h5p-question-explanation-text",
                  html: i.text,
                  appendTo: n,
                }));
          }
        })(),
          (a.getElement = function () {
            return a.$explanation;
          }));
      };
    })(H5P.jQuery)),
  (H5P.Question.ScorePoints = function () {
    var i,
      n = [];
    this.getElement = function (e) {
      var t = document.createElement("div");
      return (
        t.classList.add(e ? "h5p-question-plus-one" : "h5p-question-minus-one"),
        t.classList.add("h5p-question-hidden-one"),
        n.push(t),
        i && clearTimeout(i),
        (i = setTimeout(s, 0)),
        t
      );
    };
    var s = function () {
        var e = 0,
          t = 150;
        n.length && n.length > Math.ceil(1e3 / t) && (t = 1e3 / n.length);
        for (var i = 0; i < n.length; i++) (setTimeout(o(n[i]), e), (e += t));
      },
      o = function (e) {
        return function () {
          e.classList.remove("h5p-question-hidden-one");
        };
      };
  }),
  /*!@license H5P.DragQuestion-1.14/h5p-drag-question.js by Joubel licensed under MIT*/ (() => {
    "use strict";
    function e(e) {
      const n = e.length;
      return function t() {
        const i = Array.prototype.slice.call(arguments, 0);
        return i.length >= n
          ? e.apply(null, i)
          : function () {
              var e = Array.prototype.slice.call(arguments, 0);
              return t.apply(null, i.concat(e));
            };
      };
    }
    const t = (...e) =>
        e.reduce(
          (t, i) =>
            (...e) =>
              t(i(...e)),
        ),
      i = e(function (e, t) {
        t.forEach(e);
      }),
      n =
        (e(function (e, t) {
          return t.map(e);
        }),
        e(function (e, t) {
          return t.filter(e);
        })),
      s = e(function (e, t) {
        return t.some(e);
      }),
      o = e(function (e, t) {
        return -1 != t.indexOf(e);
      }),
      r = e(function (t, e) {
        return n((e) => !o(e, t), e);
      }),
      a = e((e, t) => t.getAttribute(e)),
      l = e((e, t, i) => i.setAttribute(e, t)),
      h = e((e, t) => t.removeAttribute(e)),
      c = e((e, t) => t.hasAttribute(e)),
      u = e((e, t, i) => i.getAttribute(e) === t),
      d =
        (e((e, t) => {
          var i = a(e, t);
          l(e, ("true" !== i).toString(), t);
        }),
        e((e, t) => e.appendChild(t)),
        e((e, t) => t.querySelector(e)),
        e((e, t) => {
          return ((e = t.querySelectorAll(e)), Array.prototype.slice.call(e));
        }),
        e((e, t) => e.removeChild(t)),
        e((e, t) => t.classList.contains(e)),
        e((e, t) => t.classList.add(e))),
      p = e((e, t) => t.classList.remove(e)),
      f = d("hidden"),
      g = p("hidden"),
      m =
        (e((e, t) => (e ? g : f)(t)),
        e((e, t, i) => {
          i.classList[t ? "add" : "remove"](e);
        }),
        h("tabindex")),
      v = (i(m), l("tabindex", "0")),
      b = l("tabindex", "-1"),
      y = c("tabindex");
    class _ {
      constructor(e) {
        (Object.assign(this, {
          listeners: {},
          on: function (e, t, i) {
            i = { listener: t, scope: i };
            return (
              (this.listeners[e] = this.listeners[e] || []),
              this.listeners[e].push(i),
              this
            );
          },
          fire: function (e, t) {
            return (this.listeners[e] || []).every(function (e) {
              return !1 !== e.listener.call(e.scope || this, t);
            });
          },
          propagate: function (e, i) {
            let n = this;
            e.forEach((t) => i.on(t, (e) => n.fire(t, e)));
          },
        }),
          (this.plugins = e || []),
          (this.elements = []),
          (this.negativeTabIndexAllowed = !1),
          this.on("nextElement", this.nextElement, this),
          this.on("previousElement", this.previousElement, this),
          this.on("firstElement", this.firstElement, this),
          this.on("lastElement", this.lastElement, this),
          this.initPlugins());
      }
      addElement(e) {
        (this.elements.push(e),
          this.firesEvent("addElement", e),
          1 === this.elements.length && this.setTabbable(e));
      }
      insertElementAt(e, t) {
        (this.elements.splice(t, 0, e),
          this.firesEvent("addElement", e),
          1 === this.elements.length && this.setTabbable(e));
      }
      removeElement(e) {
        ((this.elements = r([e], this.elements)),
          y(e) &&
            (this.setUntabbable(e),
            this.elements[0] && this.setTabbable(this.elements[0])),
          this.firesEvent("removeElement", e));
      }
      count() {
        return this.elements.length;
      }
      firesEvent(e, t) {
        var i = this.elements.indexOf(t);
        return this.fire(e, {
          element: t,
          index: i,
          elements: this.elements,
          oldElement: this.tabbableElement,
        });
      }
      nextElement({ index: e }) {
        const t = e === this.elements.length - 1,
          i = this.elements[t ? 0 : e + 1];
        (this.setTabbable(i), i.focus());
      }
      firstElement() {
        const e = this.elements[0];
        (this.setTabbable(e), e.focus());
      }
      lastElement() {
        const e = this.elements[this.elements.length - 1];
        (this.setTabbable(e), e.focus());
      }
      setTabbableByIndex(e) {
        e = this.elements[e];
        e && this.setTabbable(e);
      }
      setTabbable(e) {
        (i(this.setUntabbable.bind(this), this.elements),
          v(e),
          (this.tabbableElement = e));
      }
      setUntabbable(e) {
        e !== document.activeElement &&
          (this.negativeTabIndexAllowed ? b : m)(e);
      }
      previousElement({ index: e }) {
        const t = 0 === e,
          i = this.elements[t ? this.elements.length - 1 : e - 1];
        (this.setTabbable(i), i.focus());
      }
      useNegativeTabIndex() {
        ((this.negativeTabIndexAllowed = !0),
          this.elements.forEach((e) => {
            e.hasAttribute("tabindex") || b(e);
          }));
      }
      initPlugins() {
        this.plugins.forEach(function (e) {
          void 0 !== e.init && e.init(this);
        }, this);
      }
    }
    const w = "aria-grabbed",
      x = l(w),
      P = u(w, "true"),
      C = n(c(w)),
      k = t(i(l(w, "false")), C),
      T = t(s(P), C);
    class H {
      init(e) {
        ((this.controls = e), this.controls.on("select", this.select, this));
      }
      addElement(e) {
        (x("false", e), this.controls.addElement(e));
      }
      setAllGrabbedToFalse() {
        k(this.controls.elements);
      }
      hasAnyGrabbed() {
        return T(this.controls.elements);
      }
      select({ element: e }) {
        var t = P(e);
        (this.setAllGrabbedToFalse(), t || x("true", e));
      }
    }
    const D = "aria-dropeffect",
      I = l(D, "none"),
      S = l(D, "move"),
      E = n(c(D)),
      A = t(i(S), E),
      M = t(i(I), E);
    class O {
      init(e) {
        this.controls = e;
      }
      setAllToMove() {
        A(this.controls.elements);
      }
      setAllToNone() {
        M(this.controls.elements);
      }
    }
    O.DropEffect = {
      COPY: "copy",
      MOVE: "move",
      EXECUTE: "execute",
      POPUP: "popup",
      NONE: "none",
    };
    class N {
      constructor() {
        this.selectability = !0;
      }
      init(e) {
        ((this.boundHandleKeyDown = this.handleKeyDown.bind(this)),
          (this.controls = e),
          this.controls.on("addElement", this.listenForKeyDown, this),
          this.controls.on("removeElement", this.removeKeyDownListener, this));
      }
      listenForKeyDown({ element: e }) {
        e.addEventListener("keydown", this.boundHandleKeyDown);
      }
      removeKeyDownListener({ element: e }) {
        e.removeEventListener("keydown", this.boundHandleKeyDown);
      }
      handleKeyDown(e) {
        switch (e.which) {
          case 27:
            (this.close(e.target), e.preventDefault(), e.stopPropagation());
            break;
          case 35:
            (this.lastElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 36:
            (this.firstElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 13:
          case 32:
            (this.select(e.target), e.preventDefault(), e.stopPropagation());
            break;
          case 37:
          case 38:
            this.hasChromevoxModifiers(e) ||
              (this.previousElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 39:
          case 40:
            this.hasChromevoxModifiers(e) ||
              (this.nextElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
        }
      }
      hasChromevoxModifiers(e) {
        return e.shiftKey || e.ctrlKey;
      }
      previousElement(e) {
        !1 !== this.controls.firesEvent("beforePreviousElement", e) &&
          (this.controls.firesEvent("previousElement", e),
          this.controls.firesEvent("afterPreviousElement", e));
      }
      nextElement(e) {
        !1 !== this.controls.firesEvent("beforeNextElement", e) &&
          (this.controls.firesEvent("nextElement", e),
          this.controls.firesEvent("afterNextElement", e));
      }
      select(e) {
        this.selectability &&
          !1 !== this.controls.firesEvent("before-select", e) &&
          (this.controls.firesEvent("select", e),
          this.controls.firesEvent("after-select", e));
      }
      firstElement(e) {
        !1 !== this.controls.firesEvent("beforeFirstElement", e) &&
          (this.controls.firesEvent("firstElement", e),
          this.controls.firesEvent("afterFirstElement", e));
      }
      lastElement(e) {
        !1 !== this.controls.firesEvent("beforeLastElement", e) &&
          (this.controls.firesEvent("lastElement", e),
          this.controls.firesEvent("afterLastElement", e));
      }
      disableSelectability() {
        this.selectability = !1;
      }
      enableSelectability() {
        this.selectability = !0;
      }
      close(e) {
        !1 !== this.controls.firesEvent("before-close", e) &&
          (this.controls.firesEvent("close", e),
          this.controls.firesEvent("after-close", e));
      }
    }
    class L {
      constructor() {
        ((this.selectability = !0),
          (this.handleClickBound = this.handleClick.bind(this)),
          (this.handleDragBound = this.handleDrag.bind(this)));
      }
      init(e) {
        ((this.controls = e),
          this.controls.on("addElement", this.listenForKeyDown, this),
          this.controls.on("removeElement", this.unlistenForKeyDown, this));
      }
      listenForKeyDown({ element: e }) {
        (e.addEventListener("click", this.handleClickBound),
          e.addEventListener("drag", this.handleClickBound));
      }
      unlistenForKeyDown({ element: e }) {
        (e.removeEventListener("click", this.handleClickBound),
          e.removeEventListener("drag", this.handleDragBound));
      }
      handleClick(e) {
        this.controls.firesEvent("select", e.currentTarget);
      }
      handleDrag(e) {
        this.controls.firesEvent("drag", e.currentTarget);
      }
      disableSelectability() {
        this.selectability = !1;
      }
      enableSelectability() {
        this.selectability = !0;
      }
    }
    function z(e, t) {
      for (var i = 0; i < t.length; i++) {
        var n = t[i];
        ((n.enumerable = n.enumerable || !1),
          (n.configurable = !0),
          "value" in n && (n.writable = !0),
          Object.defineProperty(e, n.key, n));
      }
    }
    var j =
      (z((R = F), [
        {
          key: "setElementOpacity",
          value: function (e, t) {
            (F.setOpacity(e, "borderColor", t),
              F.setOpacity(e, "boxShadow", t),
              F.setOpacity(e, "background", t));
          },
        },
        {
          key: "setOpacity",
          value: function (e, t, i) {
            if ("background" === t)
              return (
                F.setOpacity(e, "backgroundColor", i),
                void F.setOpacity(e, "backgroundImage", i)
              );
            function n(e, t) {
              if ("borderColor" === e)
                return {
                  borderTopColor: t,
                  borderRightColor: t,
                  borderBottomColor: t,
                  borderLeftColor: t,
                };
              var i = {};
              return ((i[e] = t), i);
            }
            i = void 0 === i ? 1 : i / 100;
            var s,
              o = e.css(t),
              r = n(t, "");
            for (s in (e.css(r), r)) break;
            ((r = e.css(s)),
              (r = F.setAlphas(
                (r = "" === r || "none" === r ? o : r),
                "rgba(",
                i,
              )));
            ((r = F.setAlphas(r, "rgb(", i)), e.css(n(t, r)));
          },
        },
        {
          key: "setAlphas",
          value: function (e, t, i) {
            if (e) {
              for (var n = e.indexOf(t); -1 !== n; ) {
                var s = e.indexOf(")", n),
                  o = e.substring(n + t.length, s).split(",");
                ((o[3] = void 0 !== o[3] ? parseFloat(o[3]) * i : i),
                  (n = (e =
                    e.substring(0, n) +
                    "rgba(" +
                    o.join(",") +
                    e.substring(s, e.length)).indexOf(t, s)));
              }
              return e;
            }
          },
        },
        {
          key: "elementToDraggable",
          value: function (e, t) {
            for (var i = 0; i < e.length; i++)
              if (e[i]) {
                var n = e[i].findElement(t);
                if (n) return ((n.draggable = e[i]), n);
              }
          },
        },
        {
          key: "elementToDropZone",
          value: function (e, t) {
            for (var i = 0; i < e.length; i++)
              if (e[i].$dropZone.is(t)) return e[i];
          },
        },
        {
          key: "positionToPercentage",
          value: function (e, t) {
            return {
              top: (100 * parseInt(t.css("top"))) / e.innerHeight() + "%",
              left: (100 * parseInt(t.css("left"))) / e.innerWidth() + "%",
            };
          },
        },
        {
          key: "addHover",
          value: function (e, t) {
            (e.hover(
              function () {
                (e.addClass("h5p-draggable-hover"),
                  e.parent().hasClass("h5p-dragging") ||
                    F.setElementOpacity(e, t));
              },
              function () {
                e.parent().hasClass("h5p-dragging") ||
                  setTimeout(function () {
                    (e.removeClass("h5p-draggable-hover"),
                      F.setElementOpacity(e, t));
                  }, 1);
              },
            ),
              F.setElementOpacity(e, t));
          },
        },
        {
          key: "strip",
          value: function (e) {
            var t = document.createElement("div");
            return ((t.innerHTML = e), t.textContent || t.innerText || "");
          },
        },
      ]),
      Object.defineProperty(R, "prototype", { writable: !1 }),
      F);
    function F() {
      !(function (e) {
        if (!(e instanceof F))
          throw new TypeError("Cannot call a class as a function");
      })(this);
    }
    var R,
      $ = H5P.jQuery,
      q =
        ((function (e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        })((R = W).prototype, [
          {
            key: "appendTo",
            value: function (e, t) {
              var n = this,
                i = '<div class="h5p-inner"></div>',
                s = "";
              (n.showLabel &&
                ((i =
                  '<div class="h5p-label">' +
                  n.label +
                  '<span class="h5p-hidden-read"></span></div>' +
                  i),
                (s = " h5p-has-label")),
                (i =
                  '<span class="h5p-hidden-read">' +
                  n.l10n.prefix.replace("{num}", n.id + 1) +
                  "</span>" +
                  i),
                (n.$dropZone = $("<div/>", {
                  class: "h5p-dropzone" + s,
                  tabindex: "-1",
                  role: "button",
                  "aria-disabled": !0,
                  css: {
                    left: n.x + "%",
                    top: n.y + "%",
                    width: n.width + "em",
                    height: n.height + "em",
                  },
                  html: i,
                })
                  .appendTo(e)
                  .children(".h5p-inner")
                  .droppable({
                    activeClass: "h5p-active",
                    tolerance: "intersect",
                    accept: function (e) {
                      e = j.elementToDraggable(t, e);
                      return !!e && n.accepts(e.draggable, t);
                    },
                    drop: function (e, t) {
                      var i = $(this);
                      (j.setOpacity(
                        i.removeClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      ),
                        t.draggable.data("addToZone", n.id),
                        -1 === n.getIndexOf(t.draggable) &&
                          n.alignables.push(t.draggable),
                        n.autoAlignable.enabled && n.autoAlign());
                    },
                    over: function () {
                      j.setOpacity(
                        $(this).addClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      );
                    },
                    out: function () {
                      j.setOpacity(
                        $(this).removeClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      );
                    },
                  })
                  .end()
                  .focus(function () {
                    o instanceof H5P.jQuery && o.attr("tabindex", "0");
                  })
                  .blur(function () {
                    o instanceof H5P.jQuery && o.attr("tabindex", "-1");
                  })));
              var o = H5P.JoubelUI.createTip(n.tip, {
                tipLabel: n.l10n.tipLabel,
                tabcontrol: !0,
              });
              (o instanceof H5P.jQuery &&
                $("<span/>", {
                  class: "h5p-dq-tipwrap",
                  "aria-label": n.l10n.tipAvailable,
                  append: o,
                  appendTo: n.$dropZone,
                }),
                t.forEach(function (e) {
                  var t = e.element.$;
                  e.isInDropZone(n.id) &&
                    -1 === n.getIndexOf(t) &&
                    n.alignables.push(t);
                }),
                n.autoAlignable.enabled && n.autoAlign(),
                setTimeout(function () {
                  n.updateBackgroundOpacity();
                }, 0));
            },
          },
          {
            key: "updateBackgroundOpacity",
            value: function () {
              (j.setOpacity(
                this.$dropZone.children(".h5p-label"),
                "background",
                this.backgroundOpacity,
              ),
                j.setOpacity(
                  this.$dropZone.children(".h5p-inner"),
                  "background",
                  this.backgroundOpacity,
                ));
            },
          },
          {
            key: "accepts",
            value: function (e, t) {
              if (!e.hasDropZone(this.id)) return !1;
              if (this.single)
                for (var i = 0; i < t.length; i++)
                  if (t[i] && t[i].isInDropZone(this.id)) return !1;
              return !0;
            },
          },
          {
            key: "getIndexOf",
            value: function (e) {
              for (var t = 0; t < this.alignables.length; t++)
                if (this.alignables[t][0] === e[0]) return t;
              return -1;
            },
          },
          {
            key: "removeAlignable",
            value: function (e) {
              var t = this,
                e = t.getIndexOf(e);
              -1 !== e &&
                (t.alignables.splice(e, 1),
                void 0 === t.autoAlignTimer &&
                  t.autoAlignable.enabled &&
                  (t.autoAlignTimer = setTimeout(function () {
                    (delete t.autoAlignTimer, t.autoAlign());
                  }, 1)));
            },
          },
          {
            key: "autoAlign",
            value: function () {
              for (
                var t,
                  i,
                  n = this,
                  s = n.$dropZone.parent()[0].getBoundingClientRect(),
                  e =
                    (n.autoAlignable.spacing / n.autoAlignable.size.width) *
                    100,
                  o =
                    (n.autoAlignable.spacing / n.autoAlignable.size.height) *
                    100,
                  r = { x: n.x + e, y: n.y + o },
                  a = n.$dropZone[0].getBoundingClientRect(),
                  l = { x: a.width - 2 * e, y: a.height - 2 * o },
                  h = { x: l.x, y: l.y },
                  c = 0,
                  u = function () {
                    (t.css({ left: r.x + "%", top: r.y + "%" }),
                      n.trigger("elementaligned", t));
                    var e = i.width + n.autoAlignable.spacing;
                    ((h.x -= e), (r.x += (e / s.width) * 100));
                    e = i.height + n.autoAlignable.spacing;
                    c < e && (c = e);
                  },
                  d = 0;
                d < n.alignables.length;
                d++
              )
                if (
                  ((t = n.alignables[d]),
                  (i = t[0].getBoundingClientRect()),
                  h.x >= i.width)
                )
                  u();
                else {
                  if (
                    ((h.x = l.x),
                    (r.x = n.x + e),
                    c && ((h.y -= c), (r.y += (c / s.height) * 100), (c = 0)),
                    h.y <= 0)
                  )
                    return;
                  u();
                }
            },
          },
          {
            key: "highlight",
            value: function () {
              this.$dropZone
                .attr("aria-disabled", "false")
                .children(".h5p-inner")
                .addClass("h5p-active");
            },
          },
          {
            key: "dehighlight",
            value: function () {
              this.$dropZone
                .attr("aria-disabled", "true")
                .children(".h5p-inner")
                .removeClass("h5p-active");
            },
          },
          {
            key: "reset",
            value: function () {
              this.alignables = [];
            },
          },
        ]),
        Object.defineProperty(R, "prototype", { writable: !1 }),
        W);
    function W(e, t, i) {
      !(function (e) {
        if (!(e instanceof W))
          throw new TypeError("Cannot call a class as a function");
      })(this);
      var n = this;
      (H5P.EventDispatcher.call(n),
        (n.id = t),
        (n.showLabel = e.showLabel),
        (n.label = e.label),
        (n.x = e.x),
        (n.y = e.y),
        (n.width = e.width),
        (n.height = e.height),
        (n.backgroundOpacity = e.backgroundOpacity),
        (n.tip = e.tipsAndFeedback.tip || ""),
        (n.single = e.single),
        (n.autoAlignable = e.autoAlign),
        (n.alignables = []),
        (n.l10n = i));
    }
    function B(e) {
      return (B =
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
          ? function (e) {
              return typeof e;
            }
          : function (e) {
              return e &&
                "function" == typeof Symbol &&
                e.constructor === Symbol &&
                e !== Symbol.prototype
                ? "symbol"
                : typeof e;
            })(e);
    }
    function U(e, t) {
      return (U = Object.setPrototypeOf
        ? Object.setPrototypeOf.bind()
        : function (e, t) {
            return ((e.__proto__ = t), e);
          })(e, t);
    }
    function V(e) {
      if (void 0 === e)
        throw new ReferenceError(
          "this hasn't been initialised - super() hasn't been called",
        );
      return e;
    }
    function Y(e) {
      return (Y = Object.setPrototypeOf
        ? Object.getPrototypeOf.bind()
        : function (e) {
            return e.__proto__ || Object.getPrototypeOf(e);
          })(e);
    }
    function Q(e) {
      return e.stopPropagation();
    }
    var Z = H5P.jQuery,
      X = (function () {
        !(function (e, t) {
          if ("function" != typeof t && null !== t)
            throw new TypeError(
              "Super expression must either be null or a function",
            );
          ((e.prototype = Object.create(t && t.prototype, {
            constructor: { value: e, writable: !0, configurable: !0 },
          })),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            t && U(e, t));
        })(c, H5P.EventDispatcher);
        var e,
          i,
          n,
          h =
            ((i = c),
            (n = (function () {
              if ("undefined" == typeof Reflect || !Reflect.construct)
                return !1;
              if (Reflect.construct.sham) return !1;
              if ("function" == typeof Proxy) return !0;
              try {
                return (
                  Boolean.prototype.valueOf.call(
                    Reflect.construct(Boolean, [], function () {}),
                  ),
                  !0
                );
              } catch (e) {
                return !1;
              }
            })()),
            function () {
              var e,
                t = Y(i);
              return (function (e, t) {
                if (t && ("object" === B(t) || "function" == typeof t))
                  return t;
                if (void 0 !== t)
                  throw new TypeError(
                    "Derived constructors may only return object or undefined",
                  );
                return V(e);
              })(
                this,
                n
                  ? ((e = Y(this).constructor),
                    Reflect.construct(t, arguments, e))
                  : t.apply(this, arguments),
              );
            });
        function c(e, t, i, n, s, o) {
          var r;
          !(function (e) {
            if (!(e instanceof c))
              throw new TypeError("Cannot call a class as a function");
          })(this);
          var a = V((r = h.call(this)));
          if (
            ((a.$ = Z(a)),
            (a.id = t),
            (a.elements = []),
            (a.x = e.x),
            (a.y = e.y),
            (a.width = e.width),
            (a.height = e.height),
            (a.backgroundOpacity = e.backgroundOpacity),
            (a.dropZones = e.dropZones),
            (a.type = e.type),
            (a.multiple = e.multiple),
            (a.l10n = n),
            (a.allDropzones = s),
            (a.draggableNum = o),
            i)
          ) {
            a.multiple && a.elements.push({});
            for (var l = 0; l < i.length; l++)
              a.elements.push({
                dropZone: i[l].dz,
                position: { left: i[l].x + "%", top: i[l].y + "%" },
              });
          }
          return r;
        }
        return (
          (function (e, t) {
            for (var i = 0; i < t.length; i++) {
              var n = t[i];
              ((n.enumerable = n.enumerable || !1),
                (n.configurable = !0),
                "value" in n && (n.writable = !0),
                Object.defineProperty(e, n.key, n));
            }
          })((e = c).prototype, [
            {
              key: "appendTo",
              value: function (e, t) {
                if (this.elements.length)
                  for (var i = 0; i < this.elements.length; i++)
                    this.attachElement(i, e, t);
                else this.attachElement(null, e, t);
              },
            },
            {
              key: "attachElement",
              value: function (i, n, e) {
                var s,
                  o = this;
                (null === i
                  ? ((s = {}), o.elements.push(s), (i = o.elements.length - 1))
                  : (s = o.elements[i]),
                  Z.extend(s, {
                    clone: function () {
                      o.attachElement(null, n, e);
                    },
                    reset: function () {
                      (void 0 !== s.dropZone &&
                        (o.trigger("leavingDropZone", s), delete s.dropZone),
                        o.multiple &&
                          (s.$.remove(),
                          delete o.elements[i],
                          o.trigger("elementremove", s.$[0])),
                        delete s.position);
                    },
                  }),
                  (s.$ = Z("<div/>", {
                    class: "h5p-draggable",
                    tabindex: "-1",
                    role: "button",
                    css: {
                      left: o.x + "%",
                      top: o.y + "%",
                      width: o.width + "em",
                      height: o.height + "em",
                    },
                    appendTo: n,
                    title: o.type.params.title,
                  })
                    .on("click", function () {
                      o.trigger("focus", this);
                    })
                    .on("touchmove", Q)
                    .on("touchstart", Q)
                    .on("touchend", Q)
                    .draggable({
                      revert: function (e) {
                        n.removeClass("h5p-dragging");
                        var t = Z(this);
                        return (
                          (t.data("uiDraggable").originalPosition = {
                            top: o.y + "%",
                            left: o.x + "%",
                          }),
                          o.updatePlacement(s),
                          t[0].setAttribute("aria-grabbed", "false"),
                          o.trigger("dragend"),
                          !e
                        );
                      },
                      start: function () {
                        var e = Z(this),
                          t = o.mustCopyElement(s);
                        (t && s.clone(),
                          e.removeClass("h5p-wrong").detach().appendTo(n),
                          n.addClass("h5p-dragging"),
                          j.setElementOpacity(e, o.backgroundOpacity),
                          this.setAttribute("aria-grabbed", "true"),
                          o.trigger("focus", this),
                          o.trigger("dragstart", {
                            element: this,
                            effect: t ? "copy" : "move",
                          }));
                      },
                      stop: function () {
                        var e = Z(this);
                        ((s.position = j.positionToPercentage(n, e)),
                          e.css(s.position));
                        var t = e.data("addToZone");
                        void 0 !== t
                          ? (e.removeData("addToZone"),
                            o.addToDropZone(i, s, t))
                          : s.reset();
                      },
                    })
                    .css("position", "")),
                  (o.element = s).position &&
                    (s.$.css(s.position), o.updatePlacement(s)),
                  j.addHover(s.$, o.backgroundOpacity),
                  H5P.newRunnable(o.type, e, s.$),
                  Z(
                    '<span class="h5p-hidden-read">' +
                      o.l10n.prefix.replace("{num}", o.draggableNum) +
                      "</span>",
                  ).prependTo(s.$),
                  Z('<span class="h5p-hidden-read"></span>').appendTo(s.$),
                  setTimeout(function () {
                    j.setElementOpacity(s.$, o.backgroundOpacity);
                  }, 0),
                  o.trigger("elementadd", s.$[0]));
              },
            },
            {
              key: "setFeedback",
              value: function (t, i) {
                this.elements.forEach(function (e) {
                  e.dropZone === i &&
                    (void 0 === e.$feedback &&
                      (e.$feedback = Z("<span>", {
                        class: "h5p-hidden-read",
                        appendTo: e.$,
                      })),
                    e.$feedback.html(t));
                });
              },
            },
            {
              key: "mustCopyElement",
              value: function (e) {
                return this.multiple && void 0 === e.dropZone;
              },
            },
            {
              key: "hasDropZone",
              value: function (e) {
                for (var t = 0; t < this.dropZones.length; t++)
                  if (parseInt(this.dropZones[t]) === e) return !0;
                return !1;
              },
            },
            {
              key: "addToDropZone",
              value: function (e, t, i) {
                var n = this;
                if (n.multiple)
                  for (var s = 0; s < n.elements.length; s++)
                    if (
                      s !== e &&
                      void 0 !== n.elements[s] &&
                      n.elements[s].dropZone === i
                    )
                      return (
                        void 0 !== n.elements[e].dropZone &&
                          n.elements[e].dropZone !== i &&
                          n.trigger("leavingDropZone", t),
                        t.$.remove(),
                        delete n.elements[e],
                        void n.trigger("elementremove", this.element.$[0])
                      );
                (void 0 !== t.dropZone &&
                  t.dropZone !== i &&
                  n.trigger("leavingDropZone", t),
                  (t.dropZone = i),
                  n.updatePlacement(t),
                  n.trigger("interacted"));
              },
            },
            {
              key: "updatePlacement",
              value: function (e) {
                var t, i;
                (e.$suffix && e.$suffix.remove(),
                  void 0 !== e.dropZone
                    ? (e.$.addClass("h5p-dropped"),
                      j.setElementOpacity(e.$, self.backgroundOpacity),
                      (i = (i = this.allDropzones[e.dropZone].label)
                        ? (((t = document.createElement("div")).innerHTML = i),
                          t.innerText)
                        : e.dropZone + 1),
                      (e.$suffix = Z(
                        '<span class="h5p-hidden-read">' +
                          this.l10n.suffix.replace("{num}", i) +
                          "</span>",
                      ).appendTo(e.$)))
                    : (e.$.removeClass("h5p-dropped")
                        .removeClass("h5p-wrong")
                        .removeClass("h5p-correct")
                        .css({ border: "", background: "" }),
                      j.setElementOpacity(e.$, this.backgroundOpacity)));
              },
            },
            {
              key: "resetPosition",
              value: function () {
                var i = this;
                (this.elements.forEach(function (e) {
                  var t;
                  (e.$feedback && (e.$feedback.remove(), delete e.$feedback),
                    void 0 !== e.dropZone &&
                      ((t = e.$).animate(
                        { left: i.x + "%", top: i.y + "%" },
                        function () {
                          i.multiple &&
                            (void 0 !== t.dropZone &&
                              i.trigger("leavingDropZone", t),
                            t.remove(),
                            0 <= i.elements.indexOf(e) &&
                              delete i.elements[i.elements.indexOf(e)],
                            i.trigger("elementremove", t[0]));
                        },
                      ),
                      i.updatePlacement(e)));
                }),
                  i.element &&
                    (void 0 !== i.element.dropZone &&
                      (i.trigger("leavingDropZone", i.element),
                      delete i.element.dropZone),
                    i.updatePlacement(i.element)));
              },
            },
            {
              key: "findElement",
              value: function (e) {
                for (var t = 0; t < this.elements.length; t++)
                  if (void 0 !== this.elements[t] && this.elements[t].$.is(e))
                    return { element: this.elements[t], index: t };
              },
            },
            {
              key: "isInDropZone",
              value: function (e) {
                for (var t = 0; t < this.elements.length; t++)
                  if (
                    void 0 !== this.elements[t] &&
                    this.elements[t].dropZone === e
                  )
                    return !0;
                return !1;
              },
            },
            {
              key: "disable",
              value: function () {
                for (var e = 0; e < this.elements.length; e++) {
                  var t = this.elements[e];
                  t &&
                    (t.$.draggable("disable"),
                    this.trigger("elementremove", t.$[0]));
                }
              },
            },
            {
              key: "enable",
              value: function () {
                for (var e = 0; e < this.elements.length; e++) {
                  var t = this.elements[e];
                  t &&
                    (t.$.draggable("enable"),
                    this.trigger("elementadd", t.$[0]));
                }
              },
            },
            {
              key: "results",
              value: function (e, t, i) {
                var n,
                  s,
                  o,
                  r,
                  a = 0;
                if (void (this.rawPoints = 0) === t) {
                  for (n = 0; n < this.elements.length; n++)
                    void 0 !== (o = this.elements[n]) &&
                      void 0 !== o.dropZone &&
                      (!0 !== e && this.markElement(o, "wrong", i), a--);
                  return a;
                }
                for (n = 0; n < this.elements.length; n++)
                  if (
                    void 0 !== (o = this.elements[n]) &&
                    void 0 !== o.dropZone
                  ) {
                    for (r = !1, s = 0; s < t.length; s++)
                      if (o.dropZone === t[s]) {
                        (!0 !== e && this.markElement(o, "correct", i),
                          (r = !0),
                          this.rawPoints++,
                          a++);
                        break;
                      }
                    r || (!0 !== e && this.markElement(o, "wrong", i), a--);
                  }
                return a;
              },
            },
            {
              key: "markElement",
              value: function (e, t, i) {
                var n = Z("<span/>", {
                  class: "h5p-hidden-read",
                  html: this.l10n[t + "Answer"] + ". ",
                });
                (i && (n = n.add(i.getElement("correct" === t))),
                  (e.$suffix = e.$suffix.add(n)),
                  e.$.addClass("h5p-" + t).append(n),
                  j.setElementOpacity(e.$, this.backgroundOpacity));
              },
            },
          ]),
          Object.defineProperty(e, "prototype", { writable: !1 }),
          c
        );
      })(),
      K = H5P.jQuery,
      G = 0;
    function J(e, t, i) {
      var r = this;
      (G++,
        (this.id = this.contentId = t),
        (this.contentData = i),
        H5P.Question.call(r, "dragquestion"),
        (this.options = K.extend(
          !0,
          {},
          {
            scoreShow: "Check",
            tryAgain: "Retry",
            grabbablePrefix: "Grabbable {num} of {total}.",
            grabbableSuffix: "Placed in dropzone {num}.",
            dropzonePrefix: "Dropzone {num} of {total}.",
            noDropzone: "No dropzone",
            tipLabel: "Show tip.",
            tipAvailable: "Tip available",
            correctAnswer: "Correct answer",
            wrongAnswer: "Wrong answer",
            feedbackHeader: "Feedback",
            scoreBarLabel: "You got :num out of :total points",
            scoreExplanationButtonLabel: "Show score explanation",
            question: {
              settings: {
                questionTitle:
                  this.contentData &&
                  this.contentData.metadata &&
                  this.contentData.metadata.title
                    ? this.contentData.metadata.title
                    : "Drag and drop",
                size: { width: 620, height: 310 },
              },
              task: { elements: [], dropZones: [] },
            },
            overallFeedback: [],
            behaviour: {
              enableRetry: !0,
              enableCheckButton: !0,
              preventResize: !1,
              singlePoint: !1,
              applyPenalties: !0,
              enableScoreExplanation: !0,
              dropZoneHighlighting: "dragging",
              autoAlignSpacing: 2,
              showScorePoints: !0,
              showTitle: !1,
            },
            a11yCheck:
              "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
            a11yRetry:
              "Retry the task. Reset all responses and start the task over again.",
            submit: "Submit",
          },
          e,
        )),
        this.options.behaviour.singlePoint &&
          (this.options.behaviour.enableScoreExplanation = !1),
        (this.draggables = []),
        (this.dropZones = []),
        (this.answered =
          i &&
          void 0 !== i.previousState &&
          void 0 !== i.previousState.answers &&
          i.previousState.answers.length),
        (this.blankIsCorrect = !0),
        (this.backgroundOpacity =
          void 0 === this.options.behaviour.backgroundOpacity ||
          "" === this.options.behaviour.backgroundOpacity.trim()
            ? void 0
            : this.options.behaviour.backgroundOpacity),
        (r.$noDropZone = K(
          '<div class="h5p-dq-no-dz" role="button" style="display:none;"><span class="h5p-hidden-read">' +
            r.options.noDropzone +
            "</span></div>",
        )));
      function n(e) {
        for (var t = 0; t < s.drop.elements.length; t++)
          s.drop.elements[t].setAttribute("aria-dropeffect", e);
      }
      var s = ee(r.draggables, r.dropZones, r.$noDropZone[0]),
        o = [],
        a = this.options.question.task;
      for (this.correctDZs = [], f = 0; f < a.dropZones.length; f++) {
        o.push(!0);
        for (var l = a.dropZones[f].correctElements, h = 0; h < l.length; h++) {
          var c = l[h];
          (void 0 === this.correctDZs[c] && (this.correctDZs[c] = []),
            this.correctDZs[c].push(f));
        }
      }
      this.weight = 1;
      for (
        var u = function (e) {
            return !(void 0 === e.dropZones || !e.dropZones.length);
          },
          d = {
            prefix: r.options.grabbablePrefix.replace(
              "{total}",
              a.elements.filter(u).length,
            ),
            suffix: r.options.grabbableSuffix,
            correctAnswer: r.options.correctAnswer,
            wrongAnswer: r.options.wrongAnswer,
          },
          p = 1,
          f = 0;
        f < a.elements.length;
        f++
      ) {
        var g = a.elements[f];
        if (u(g)) {
          void 0 !== this.backgroundOpacity &&
            (g.backgroundOpacity = this.backgroundOpacity);
          var m = null;
          i &&
            void 0 !== i.previousState &&
            void 0 !== i.previousState.answers &&
            void 0 !== i.previousState.answers[f] &&
            (m = i.previousState.answers[f]);
          var m = new X(g, f, m, d, a.dropZones, p++),
            v = "dragging" === r.options.behaviour.dropZoneHighlighting;
          for (
            m.on("elementadd", function (e) {
              s.drag.addElement(e.data);
            }),
              m.on("elementremove", function (e) {
                (s.drag.removeElement(e.data),
                  "true" === e.data.getAttribute("aria-grabbed") &&
                    (s.drag.firesEvent("select", e.data),
                    e.data.removeAttribute("aria-grabbed")));
              }),
              m.on("focus", function (e) {
                (s.drag.setTabbable(e.data), e.data.focus());
              }),
              m.on("dragstart", function (e) {
                (v && r.$container.addClass("h5p-dq-highlight-dz"), n(e.data));
              }),
              m.on("dragend", function () {
                (v && r.$container.removeClass("h5p-dq-highlight-dz"),
                  n("none"));
              }),
              m.on("interacted", function () {
                ((r.answered = !0), r.triggerXAPI("interacted"));
              }),
              m.on("leavingDropZone", function (e) {
                r.dropZones[e.data.dropZone].removeAlignable(e.data.$);
              }),
              this.draggables[f] = m,
              h = 0;
            h < g.dropZones.length;
            h++
          )
            o[g.dropZones[h]] = !1;
        }
      }
      this.numDropZonesWithoutElements = 0;
      var b = {
        prefix: r.options.dropzonePrefix.replace("{total}", a.dropZones.length),
        tipLabel: r.options.tipLabel,
        tipAvailable: r.options.tipAvailable,
      };
      for (f = 0; f < a.dropZones.length; f++) {
        var y = a.dropZones[f];
        (!0 === o[f] && (this.numDropZonesWithoutElements += 1),
          this.blankIsCorrect &&
            y.correctElements.length &&
            (this.blankIsCorrect = !1),
          (y.autoAlign = {
            enabled: y.autoAlign,
            spacing: r.options.behaviour.autoAlignSpacing,
            size: r.options.question.settings.size,
          }),
          (this.dropZones[f] = new q(y, f, b)),
          this.dropZones[f].on("elementaligned", function (e) {
            for (var t = e.data, i = 0; i < r.draggables.length; i++) {
              var n = r.draggables[i];
              if (n && n.elements && n.elements.length)
                for (var s = 0; s < n.elements.length; s++) {
                  var o = n.elements[s];
                  if (o && o.$[0] === t[0])
                    return void (o.position = j.positionToPercentage(
                      r.$container,
                      o.$,
                    ));
                }
            }
          }));
      }
      (this.on("resize", r.resize, r),
        this.on("domChanged", function (e) {
          r.contentId === e.data.contentId && r.trigger("resize");
        }),
        this.on("enterFullScreen", function () {
          r.$container &&
            (r.$container.parents(".h5p-content").css("height", "100%"),
            r.trigger("resize"));
        }),
        this.on("exitFullScreen", function () {
          r.$container &&
            (r.$container.parents(".h5p-content").css("height", "auto"),
            r.trigger("resize"));
        }));
    }
    ((((J.prototype = Object.create(H5P.Question.prototype)).constructor =
      J).prototype.registerDomElements = function () {
      var e = this;
      e.options.behaviour.showTitle &&
        ((e.$introduction = K(
          '<p class="h5p-dragquestion-introduction" id="dq-intro-' +
            G +
            '">' +
            e.options.question.settings.questionTitle +
            "</p>",
        )),
        e.setIntroduction(e.$introduction));
      var t,
        i,
        n = "";
      (void 0 !== this.options.question.settings.background &&
        (n += "h5p-dragquestion-has-no-background"),
        "always" === e.options.behaviour.dropZoneHighlighting &&
          (n && (n += " "), (n += "h5p-dq-highlight-dz-always")),
        e.setContent(e.createQuestionContent(), { class: n }),
        !1 !== H5P.canHasFullScreen &&
          this.options.behaviour.enableFullScreen &&
          ((i = K("<div/>", {
            class: "h5p-my-fullscreen-button-enter",
            title: this.options.localize.fullscreen,
            role: "button",
            tabindex: 0,
            on: {
              click: (t = function () {
                H5P.isFullscreen
                  ? H5P.exitFullScreen(e.$container)
                  : H5P.fullScreen(e.$container.parent().parent(), e);
              }),
              keypress: function (e) {
                (13 !== e.which && 32 !== e.which) || (t(), e.preventDefault());
              },
            },
            prependTo: this.$container.parent(),
          })),
          this.on("enterFullScreen", function () {
            (i.attr("class", "h5p-my-fullscreen-button-exit"),
              i.attr("title", this.options.localize.exitFullscreen));
          }),
          this.on("exitFullScreen", function () {
            (i.attr("class", "h5p-my-fullscreen-button-enter"),
              i.attr("title", this.options.localize.fullscreen));
          })),
        e.registerButtons(),
        setTimeout(function () {
          e.trigger("resize");
        }, 200));
    }),
      (J.prototype.getXAPIData = function () {
        var e = this.createXAPIEventTemplate("answered");
        return (
          this.addQuestionToXAPI(e),
          this.addResponseToXAPI(e),
          { statement: e.data.statement }
        );
      }),
      (J.prototype.addQuestionToXAPI = function (e) {
        e = e.getVerifiedStatementValue(["object", "definition"]);
        K.extend(e, this.getXAPIDefinition());
      }),
      (J.prototype.getXAPIDefinition = function () {
        var e = {};
        ((e.description = {
          "en-US": K(
            "<div>" + this.options.question.settings.questionTitle + "</div>",
          ).text(),
        }),
          (e.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
          (e.interactionType = "matching"),
          (e.source = []));
        for (var t = 0; t < this.options.question.task.elements.length; t++) {
          var i = this.options.question.task.elements[t];
          i.dropZones &&
            i.dropZones.length &&
            ((i = i.type.params.alt || i.type.params.text),
            e.source.push({
              id: "" + t,
              description: { "en-US": K("<div>" + i + "</div>").text() },
            }));
        }
        ((e.correctResponsesPattern = [""]), (e.target = []));
        for (
          var n = !0, t = 0;
          t < this.options.question.task.dropZones.length;
          t++
        )
          if (
            (e.target.push({
              id: "" + t,
              description: {
                "en-US": K(
                  "<div>" +
                    this.options.question.task.dropZones[t].label +
                    "</div>",
                ).text(),
              },
            }),
            this.options.question.task.dropZones[t].correctElements)
          )
            for (
              var s = 0;
              s <
              this.options.question.task.dropZones[t].correctElements.length;
              s++
            ) {
              var o = this.options.question.task,
                r = o.elements[o.dropZones[t].correctElements[s]];
              !r ||
                r.dropZones.indexOf(t.toString()) < 0 ||
                (n || (e.correctResponsesPattern[0] += "[,]"),
                (e.correctResponsesPattern[0] +=
                  t + "[.]" + o.dropZones[t].correctElements[s]),
                (n = !1));
            }
        return e;
      }),
      (J.prototype.addResponseToXAPI = function (e) {
        var t = this.getMaxScore(),
          i = this.getScore();
        (e.setScoredResult(i, t, this, !0, i == t),
          (e.data.statement.result.response = this.getUserXAPIResponse()));
      }),
      (J.prototype.getUserXAPIResponse = function () {
        var e = this.getUserAnswers();
        return e
          ? e
              .filter(function (e) {
                return e.elements.length;
              })
              .map(function (t) {
                return t.elements
                  .filter(function (e) {
                    return void 0 !== e.dropZone;
                  })
                  .map(function (e) {
                    return e.dropZone + "[.]" + t.index;
                  })
                  .join("[,]");
              })
              .filter(function (e) {
                return void 0 !== e && "" !== e;
              })
              .join("[,]")
          : "";
      }),
      (J.prototype.getUserAnswers = function () {
        return this.draggables
          .map(function (e, t) {
            return { index: t, draggable: e };
          })
          .filter(function (e) {
            return void 0 !== e.draggable && e.draggable.elements;
          })
          .map(function (e) {
            return { index: e.index, elements: e.draggable.elements };
          });
      }),
      (J.prototype.createQuestionContent = function () {
        ((this.$container = K(
          '<div class="h5p-inner" role="application"></div>',
        )),
          void 0 !== this.options.question.settings.background &&
            this.$container.css(
              "backgroundImage",
              'url("' +
                H5P.getPath(
                  this.options.question.settings.background.path,
                  this.id,
                ) +
                '")',
            ));
        for (
          var e = this.options.question.task, t = 0;
          t < e.elements.length;
          t++
        ) {
          var i,
            n = e.elements[t];
          void 0 !== n.dropZones && 0 !== n.dropZones.length
            ? this.draggables[t].appendTo(this.$container, this.id)
            : ((i = this.addElement(n, "static", t)),
              H5P.newRunnable(n.type, this.id, i),
              (function (e, t) {
                setTimeout(function () {
                  j.setOpacity(e, "background", t.backgroundOpacity);
                }, 0);
              })(i, n));
        }
        for (
          this.$noDropZone.appendTo(this.$container), t = 0;
          t < this.dropZones.length;
          t++
        )
          this.dropZones[t].appendTo(this.$container, this.draggables);
        return this.$container;
      }),
      (J.prototype.registerButtons = function () {
        (this.options.behaviour.enableCheckButton && this.addSolutionButton(),
          this.addRetryButton());
      }),
      (J.prototype.addSolutionButton = function () {
        var t = this;
        this.addButton(
          "check-answer",
          this.options.scoreShow,
          function () {
            ((t.answered = !0),
              t.showAllSolutions(),
              t.showScore(),
              t.addExplanation());
            var e = t.createXAPIEventTemplate("answered");
            (t.addQuestionToXAPI(e),
              t.addResponseToXAPI(e),
              t.trigger(e),
              (t.$introduction || t.$container.children().first()).focus());
          },
          !0,
          { "aria-label": this.options.a11yCheck },
          {
            contentData: this.contentData,
            textIfSubmitting: this.options.submit,
          },
        );
      }),
      (J.prototype.addExplanation = function () {
        var e = this,
          t = this.options.question.task,
          a = [];
        (t.dropZones.forEach(function (n, s) {
          var i,
            o,
            r = {
              correct: n.tipsAndFeedback.feedbackOnCorrect,
              incorrect: n.tipsAndFeedback.feedbackOnIncorrect,
            };
          (void 0 === r.correct && void 0 === r.incorrect) ||
            ((i = n.correctElements),
            (o = {}),
            e.draggables.forEach(function (t) {
              t.elements.forEach(function (e) {
                e.dropZone == s &&
                  (o[t.id] = {
                    instance: t,
                    correct: -1 !== i.indexOf("" + t.id),
                  });
              });
            }),
            Object.keys(o).forEach(function (e) {
              var t = o[e],
                i =
                  j.strip(
                    t.instance.type.params.alt || t.instance.type.params.text,
                  ) || "?",
                e = j.strip(n.label);
              t.correct && r.correct
                ? (a.push({ correct: e + " + " + i, text: r.correct }),
                  t.instance.setFeedback(r.correct, s))
                : !t.correct &&
                  r.incorrect &&
                  (a.push({ correct: e + " + ", wrong: i, text: r.incorrect }),
                  t.instance.setFeedback(r.incorrect, s));
            }));
        }),
          0 !== a.length &&
            this.setExplanation(a, this.options.feedbackHeader));
      }),
      (J.prototype.addRetryButton = function () {
        var e = this;
        this.addButton(
          "try-again",
          this.options.tryAgain,
          function () {
            (e.resetTask(),
              e.showButton("check-answer"),
              e.hideButton("try-again"));
          },
          !1,
          { "aria-label": this.options.a11yRetry },
        );
      }),
      (J.prototype.addElement = function (e, t, i) {
        return K(
          '<div class="h5p-' +
            t +
            '" style="left:' +
            e.x +
            "%;top:" +
            e.y +
            "%;width:" +
            e.width +
            "em;height:" +
            e.height +
            'em"></div>',
        )
          .appendTo(this.$container)
          .data("id", i);
      }),
      (J.prototype.resize = function (e) {
        var t,
          i,
          n,
          s,
          o = this;
        void 0 !== this.$container &&
          this.$container.is(":visible") &&
          (o.dropZones.forEach(function (e) {
            e.updateBackgroundOpacity();
          }),
          (n = e && e.data && e.data.decreaseSize) ||
            o.$container
              .parents(".h5p-standalone.h5p-dragquestion")
              .css("width", ""),
          (s = (t = this.options.question.settings.size).width / t.height),
          (e =
            (i = this.$container.parent()).width() -
            parseFloat(i.css("margin-left")) -
            parseFloat(i.css("margin-right"))),
          (i = o.$container.parents(
            ".h5p-standalone.h5p-dragquestion.h5p-semi-fullscreen",
          )).length &&
            (i.css("width", ""),
            n ||
              (o.$container.css("width", "10px"),
              i.css("width", ""),
              setTimeout(function () {
                o.trigger("resize", { decreaseSize: !0 });
              }, 200)),
            (n = K(window.frameElement)) &&
              ((e = n.parent().width()), i.css("width", e + "px"))),
          (s = e / s),
          e <= 0 && ((e = t.width), (s = t.height)),
          this.$container.css({
            width: e + "px",
            height: s + "px",
            fontSize: (e / t.width) * 16 + "px",
          }));
      }),
      (J.prototype.disableDraggables = function () {
        this.draggables.forEach(function (e) {
          e.disable();
        });
      }),
      (J.prototype.enableDraggables = function () {
        this.draggables.forEach(function (e) {
          e.enable();
        });
      }),
      (J.prototype.showAllSolutions = function (e) {
        var t;
        ((this.points = 0),
          (this.rawPoints = 0),
          this.blankIsCorrect && ((this.points = 1), (this.rawPoints = 1)),
          !e &&
            this.options.behaviour.showScorePoints &&
            !this.options.behaviour.singlePoint &&
            this.options.behaviour.applyPenalties &&
            (t = new H5P.Question.ScorePoints()));
        for (var i = 0; i < this.draggables.length; i++) {
          var n = this.draggables[i];
          void 0 !== n &&
            (e || n.disable(),
            (this.points += n.results(e, this.correctDZs[i], t)),
            (this.rawPoints += n.rawPoints));
        }
        (this.points < 0 && (this.points = 0),
          !this.answered && this.blankIsCorrect && (this.points = this.weight),
          this.options.behaviour.singlePoint &&
            (this.points = this.points === this.calculateMaxScore() ? 1 : 0),
          e || this.hideButton("check-answer"),
          this.options.behaviour.enableRetry &&
            !e &&
            this.showButton("try-again"),
          !this.hasButton("check-answer") ||
            (!1 !== this.options.behaviour.enableRetry &&
              this.points !== this.getMaxScore()) ||
            this.hideButton("try-again"));
      }),
      (J.prototype.showSolutions = function () {
        (this.showAllSolutions(),
          this.showScore(),
          this.hideButton("check-answer"),
          this.hideButton("try-again"),
          this.disableDraggables());
      }),
      (J.prototype.resetTask = function () {
        if (
          ((this.points = 0),
          (this.rawPoints = 0),
          (this.answered = !1),
          this.$container)
        )
          (this.dropZones.forEach(function (e) {
            e.reset();
          }),
            this.enableDraggables(),
            this.draggables.forEach(function (e) {
              e.resetPosition();
            }));
        else
          for (var e = 0; e < this.draggables.length; e++)
            if (void 0 !== this.draggables[e])
              for (var t = 0; t < this.draggables[e].elements.length; t++)
                void 0 !== this.draggables[e].elements[t] &&
                  ((this.draggables[e].elements[t].dropZone = void 0),
                  (this.draggables[e].elements[t].position = void 0));
        (this.showButton("check-answer"),
          this.hideButton("try-again"),
          this.removeFeedback(),
          this.setExplanation());
      }),
      (J.prototype.calculateMaxScore = function () {
        var e = 0;
        if (this.blankIsCorrect) return 1;
        for (
          var t = this.options.question.task.elements, i = 0;
          i < t.length;
          i++
        ) {
          var n = this.correctDZs[i];
          void 0 !== n && n.length && (t[i].multiple ? (e += n.length) : e++);
        }
        return e;
      }),
      (J.prototype.getMaxScore = function () {
        return this.options.behaviour.singlePoint
          ? this.weight
          : this.calculateMaxScore();
      }),
      (J.prototype.getScore = function () {
        this.showAllSolutions(!0);
        var e =
          this.options.behaviour.applyPenalties ||
          this.options.behaviour.singlePoint
            ? this.points
            : this.rawPoints;
        return (delete this.points, delete this.rawPoints, e);
      }),
      (J.prototype.getAnswerGiven = function () {
        return this.answered || this.blankIsCorrect;
      }),
      (J.prototype.showScore = function () {
        var e = this.calculateMaxScore();
        this.options.behaviour.singlePoint && (e = 1);
        var t =
            this.options.behaviour.applyPenalties ||
            this.options.behaviour.singlePoint
              ? this.points
              : this.rawPoints,
          i = H5P.Question.determineOverallFeedback(
            this.options.overallFeedback,
            t / e,
          )
            .replace("@score", t)
            .replace("@total", e),
          n =
            !(
              !this.options.behaviour.enableScoreExplanation ||
              !this.options.behaviour.applyPenalties
            ) && this.options.scoreExplanation;
        this.setFeedback(
          i,
          t,
          e,
          this.options.scoreBarLabel,
          n,
          void 0,
          this.options.scoreExplanationButtonLabel,
        );
      }),
      (J.prototype.getCurrentState = function () {
        for (var e = { answers: [] }, t = 0; t < this.draggables.length; t++) {
          var i = this.draggables[t];
          if (void 0 !== i) {
            for (var n = [], s = 0; s < i.elements.length; s++) {
              var o = i.elements[s];
              void 0 !== o &&
                void 0 !== o.dropZone &&
                n.push({
                  x: o.position
                    ? Number(o.position.left.replace("%", ""))
                    : null,
                  y: o.position
                    ? Number(o.position.top.replace("%", ""))
                    : null,
                  dz: o.dropZone,
                });
            }
            n.length && (e.answers[t] = n);
          }
        }
        return e;
      }),
      (J.prototype.getTitle = function () {
        return H5P.createTitle(
          this.contentData &&
            this.contentData.metadata &&
            this.contentData.metadata.title
            ? this.contentData.metadata.title
            : "Drag and drop",
        );
      }));
    var ee = function (r, a, l) {
      var h,
        c = {
          drag: new _([new N(), new L(), new H()]),
          drop: new _([new N(), new L(), new O()]),
        };
      (c.drag.useNegativeTabIndex(), c.drop.useNegativeTabIndex());
      function u() {
        (h.draggable.trigger("dragend"),
          h.element.$.removeClass("h5p-draggable-hover"),
          j.setElementOpacity(h.element.$, h.draggable.backgroundOpacity),
          -1 !== c.drop.elements.indexOf(l) &&
            (c.drop.removeElement(l), (l.style.display = "none")));
        for (var e, t = 0; t < a.length; t++) {
          var i = a[t];
          (i.dehighlight(),
            -1 !== c.drop.elements.indexOf(i.$dropZone[0]) &&
              c.drop.removeElement(i.$dropZone[0]));
        }
        (h.element.$.is(":visible")
          ? h.element.$.focus()
          : ((e = h.draggable.elements[h.draggable.elements.length - 1].$),
            c.drag.setTabbable(e[0]),
            e.focus()),
          (h = void 0));
      }
      return (
        c.drag.on("select", function (e) {
          c.drag.removeElement(l);
          var t,
            i = j.elementToDraggable(r, e.element);
          if (h) u();
          else {
            ((h = i).element.$.addClass("h5p-draggable-hover"),
              j.setElementOpacity(h.element.$, h.draggable.backgroundOpacity),
              h.draggable.trigger(
                "dragstart",
                h.draggable.mustCopyElement(h.element) ? "copy" : "move",
              ),
              c.drop.addElement(l),
              (l.style.display = "block"),
              (l.style.left = h.draggable.x + "%"),
              (l.style.top = h.draggable.y + "%"),
              (l.style.width = h.draggable.width + "em"),
              (l.style.height = h.draggable.height + "em"));
            for (var n = 0; n < a.length; n++) {
              var s = a[n],
                o =
                  h.draggable.isInDropZone(s.id) &&
                  e.element !== h.draggable.element.$[0];
              (s.accepts(h.draggable, r) || o) &&
                (s.highlight(),
                c.drop.addElement(s.$dropZone[0]),
                (t && h.element.dropZone !== s.id) || (t = s.$dropZone));
            }
            t ? (c.drop.setTabbable(t[0]), t.focus()) : c.drag.addElement(l);
          }
        }),
        c.drop.on("select", function (e) {
          if (h) {
            if (e.element === l)
              return (
                void 0 !== h.element.dropZone && h.element.reset(),
                void (
                  void 0 !== h &&
                  (h.element.$.css({
                    left: h.draggable.x + "%",
                    top: h.draggable.y + "%",
                    width: h.draggable.width + "em",
                    height: h.draggable.height + "em",
                  }),
                  h.draggable.updatePlacement(h.element),
                  h.element.$[0].setAttribute("aria-grabbed", "false"),
                  u())
                )
              );
            e = j.elementToDropZone(a, e.element);
            (h.draggable.mustCopyElement(h.element) && h.element.clone(),
              h.draggable.addToDropZone(h.index, h.element, e.id),
              h.element.$.css({ left: e.x + "%", top: e.y + "%" }),
              -1 === e.getIndexOf(h.element.$) &&
                e.alignables.push(h.element.$),
              e.autoAlign(),
              h.element.$[0].setAttribute("aria-grabbed", "false"),
              u());
          }
        }),
        c
      );
    };
    H5P.DragQuestion = J;
  })());
const realH5PGetPath = H5P.getPath;
H5P.getPath = function (e, t) {
  return e.startsWith("data:") ? e : realH5PGetPath(e, t);
};
var furtherH5PInlineResources = {
  "jQuery.ui-1.10/images/animated-overlay.gif":
    "data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==",
  "jQuery.ui-1.10/images/ui-bg_flat_0_aaaaaa_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAe0lEQVRoge3OMQHAIBAAMcC/kjdZJHTI0A4XBdkz86wfO18H3hRUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUF8O8A8WdY6opAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_flat_75_ffffff_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAeUlEQVRoge3OMQHAIBAAsVL/nh8JDDfAkCjImpn5HvbfDpwIVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVhtqiwTEKTLXTgAAAABJRU5ErkJggg==",
  "jQuery.ui-1.10/images/ui-bg_glass_55_fbf9ee_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAP0lEQVQ4je3PMQrAMABC0a/3v2zX0mCXNkOgc6C4PARd5DqPGKCU8luS8SbAQhiCQRgJE56kZTfbbP9RSvnkBsWcEAZRWcgqAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_65_ffffff_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAMElEQVQ4je3LIQ4AIBTD0O3f/8wrFgmKhMy8pKJKwkhSKeVbbGuAPU9f4PIopTxgAeS0DRtI4yK0AAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_dadada_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANklEQVQ4jWN48uTJfyYGBgaGUWKUGCWGLfHt2zcoi5GREYNgYmJCZiG42IiB98woMUqMEtgIAMdjCdyg+eEBAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_e6e6e6_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANUlEQVQ4je3LMQoAIBADwb38/6t5wFXaWAiCtUiaYZvF9hBACOFbuntVVe11B0CSjjeE8BwThQIJ8dhEl0YAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-bg_glass_95_fef1ec_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAPklEQVQ4je3PMQqAMABD0Z/c/7aCIAXjJIhD10LJ8vgZw30eMUApZV/GhZNgSTjoLYElY/hNMJ/S6gullCkPiCIPCr4NiEwAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-bg_highlight-soft_75_cccccc_1x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAYAAABHLFpgAAAALElEQVQYlWN49OjRfyYGBgaGIUT8//8fSqBx0Yh///4RL8vAwAAVQ2MNOwIAl6g6KkOJwk8AAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-icons_222222_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_2e83ff_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_454545_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_888888_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_cd0a0a_256x240.png":
    "data:image/png;base64, ",
};
!(function () {
  H5P.ContentType = function (t) {
    function e() {}
    return (
      ((e.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return t;
      }),
      (e.prototype.getLibraryFilePath = function (t) {
        return (
          furtherH5PInlineResources[
            this.libraryInfo.versionedNameNoSpaces + "/" + t
          ] || t
        );
      }),
      e
    );
  };
  var i = HTMLScriptElement.prototype.setAttribute;
  ((HTMLScriptElement.prototype.setAttribute = function (t, e) {
    if ("src" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    i.call(this, t, e);
  }),
    Object.defineProperty(HTMLScriptElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
  var n = HTMLLinkElement.prototype.setAttribute;
  ((HTMLLinkElement.prototype.setAttribute = function (t, e) {
    if ("href" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    n.call(this, t, e);
  }),
    Object.defineProperty(HTMLLinkElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
})();
H5P.getPath = function (t, n) {
  return t;
};
