    /*

    Siesta 5.3.0
    Copyright(c) 2009-2019 Bryntum AB
    https://bryntum.com/contact
    https://bryntum.com/products/siesta/license

    */
    Class('Ariadne.ExtJSDomQueryFinder.Identifier.CssClass', {

        isa         : Ariadne.DomQueryFinder.Identifier.CssClass,

        does        : Ariadne.ExtJSDomQueryFinder.Role.ExtJSHelper,

        has         : {
            ignoreCssClasses            : function () {
                return [
                    // ignore focus, hover specific CSS classes
                    '-focus$',
                    '-focused$',
                    '-over$',
                    '-hover$',
                    '-selected$',
                    '-active$',
                    '-default$',
                    'x-form-dirty',
                    'x-grid-dirty-cell',
                    'x-unselectable',
                    '-toolbar-item$',
                    '-item-disabled',
                    'x-form-empty-field',
                    'x-grid-item-alt'
    //                ,
    //                'sch-event-inner',
    //                'x-table-layout-cell'
                ]
            },

            lessRelevantCssClasses : function () {
                return [
                    'x-form-field',
                    'x-form-required-field',
                    '-layout',
                    '-inner$',
                    '-default$',
                    '-box-',
                    '^x-tree-elbow'
                ]
            }
        },

        methods : {

            initialize : function () {
                this.SUPERARG(arguments)

                var lessRelevantCssClasses  = this.lessRelevantCssClasses

                lessRelevantCssClasses.forEach(function (cls, index) {
                    lessRelevantCssClasses[ index ] = new RegExp(cls)
                })
            },

            getWeightForCssClass : function (cls, target) {
                var prefix          = this.getExtCssClassPrefixRegexp(target)

                if (
                    this.lessRelevantCssClasses.some(function (lessRelevantClsRegExp) {
                        return lessRelevantClsRegExp.test(cls)
                    })
                )
                    return 1000

                // no Ext or css class belongs to Ext - normal weight
                if (!prefix || prefix.test(cls)) return 995

                // user-assigned css class - a bit lower weight to always prefer such classes
                return 950
            },

            ignoreCssClass : function (cls, dom) {
                var cmp     = this.getComponentOfDomElement(dom)

                if (cmp && this.valueIsAutoGeneratedByComponent(cmp, cls)) return true

                return this.SUPER(cls, dom)
            },

            processCssClasses : function (classes, target) {
                var prefix          = this.getExtCssClassPrefixRegexp(target)

                if (!prefix) return classes

                classes.sort(function (cls1, cls2) {
                    var test1   = prefix.test(cls1)
                    var test2   = prefix.test(cls2)

                    if (test1 && !test2) return 1
                    if (!test1 && test2) return -1

                    return 0
                })

                return classes
            }
        }
    });

    // old ignore classes

    //        ignoreClasses           : function () {
    //            return [
    //                'x-body',
    //                'x-box-item',
    //                'x-btn-wrap',
    //                'x-component',      // too generic
    //                'x-datepicker-cell',
    //                'x-fit-item',
    //                'x-form-field',     // too generic
    //                'x-form-empty-field',
    //                'x-form-required-field',
    //                'x-grid-cell-inner',  // we prefer "x-grid-cell"
    //                'x-grid-view',
    //                'x-grid-resize-marker',
    //                'x-layout',
    //                'x-menu-item-link',
    //                'x-noicon',
    //                'x-resizable-overlay',
    //                'x-tab-noicon',
    //                'x-tab-default-noicon',
    //                'x-tab-default',
    //                'x-tab-inner',
    //                'x-tab-button',
    //                'x-tab-text',
    //                'x-tab-icon',
    //                'x-tab-wrap',
    //                'x-tree-icon',
    //                'x-frame-mc',
    //                'x-trigger-index-',
    //                'x-unselectable',
    //                'x-grid-with-row-lines',
    //                '^x-autocontainer-',
    //                '^x-btn-inner',
    //                'x-column-header-text-inner',
    //                '^x-noborder',
    //                'x-box-inner',
    //                'x-monthpicker-item-inner',
    //                'x-box-target',
    //                'x-dd-drag-proxy',
    //                // Ext3 panel body classes
    //                'x-panel-bwrap',
    //
    //                // Bryntum generic selectors
    //                'sch-gantt-terminal$',
    //                'sch-gantt-task-handle$',
    //                'sch-gantt-item$',
    //                'sch-terminal$',
    //                'sch-resizable-handle$',
    //
    //                // In case someone left garbage in the DOM
    //                'null',
    //                'undefined'
    //            ];