public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
/**
   * Adds a tag which was activly typed by the user
   * @param {String/Array} tagItem   [A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings]
   */
Adds a tag which was activly typed by the user
@param {String/Array} tagItem   [A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings]
Adds a tag which was activly typed by the user @param { String / Array } tagItem [ A string ( single or multiple values with a delimiter ) or an Array of Objects or just Array of Strings ]
prefixedTextToTag(tagItem) {
    var _s = this.settings,
        tagElm,
        createdFromDelimiters = this.state.tag.delimiters;
    _s.transformTag.call(this, tagItem);
    tagItem.prefix = tagItem.prefix || this.state.tag ? this.state.tag.prefix : (_s.pattern.source || _s.pattern)[0]; 
    tagElm = this.createTagElem(tagItem); 
    if (!this.replaceTextWithNode(tagElm)) {
      this.DOM.input.appendChild(tagElm);
    }
    setTimeout(() => tagElm.classList.add(this.settings.classNames.tagNoAnimation), 300);
    this.value.push(tagItem);
    this.update();
    if (!createdFromDelimiters) {
      var elm = this.insertAfterTag(tagElm) || tagElm;
      this.placeCaretAfterNode(elm);
    }
    this.state.tag = null;
    this.trigger('add', extend({}, {
      tag: tagElm
    }, {
      data: tagItem
    }));
    return tagElm;
  }
prefixedTextToTag ( tagItem ) { var _s = this . settings , tagElm , createdFromDelimiters = this . state . tag . delimiters ; _s . transformTag . call ( this , tagItem ) ; tagItem . prefix = tagItem . prefix || this . state . tag ? this . state . tag . prefix : ( _s . pattern . source || _s . pattern ) [ 0 ] ; tagElm = this . createTagElem ( tagItem ) ; if ( ! this . replaceTextWithNode ( tagElm ) ) { this . DOM . input . appendChild ( tagElm ) ; } setTimeout ( ( ) => tagElm . classList . add ( this . settings . classNames . tagNoAnimation ) , 300 ) ; this . value . push ( tagItem ) ; this . update ( ) ; if ( ! createdFromDelimiters ) { var elm = this . insertAfterTag ( tagElm ) || tagElm ; this . placeCaretAfterNode ( elm ) ; } this . state . tag = null ; this . trigger ( 'add' , extend ( { } , { tag : tagElm } , { data : tagItem } ) ) ; return tagElm ; }
Adds a tag which was activly typed by the user
 @param {String/Array} tagItem   [A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings]
Adds a tag which was activly typed by the user @param { String / Array } tagItem [ A string ( single or multiple values with a delimiter ) or an Array of Objects or just Array of Strings ]
// TODO: should check if the tag is valid // tries to replace a taged textNode with a tagElm, and if not able, // insert the new tag to the END if "addTags" was called from outside