/*
Template Name: Hybrix - Admin & Dashboard Template
Author: Themesbrand
Version: 1.1.0
Website: https://Themesbrand.com/
Contact: Themesbrand@gmail.com
File: Common Plugins Js File
*/

(function(){
  // obtiene el script actual (funciona en la mayoría de navegadores)
  var script = document.currentScript || (function(){
    var scripts = document.getElementsByTagName('script');
    return scripts[scripts.length - 1];
  })();

  var base = script.src.replace(/\/[^\/]+$/, '/'); // directorio de plugins.js
  var toastifyUrl = 'https://cdn.jsdelivr.net/npm/toastify-js';
  var choicesUrl = new URL('../libs/choices.js/public/assets/scripts/choices.min.js', base).href;
  var flatpickrUrl = new URL('../libs/flatpickr/flatpickr.min.js', base).href;

  // inserta los scripts (escapa cierre de script)
  document.write('<script src="' + toastifyUrl + '"><\/script>');
  document.write('<script src="' + choicesUrl + '"><\/script>');
  document.write('<script src="' + flatpickrUrl + '"><\/script>');
})();