text: ["^ ","~:resource-id",["~:shadow.build.npm/resource","node_modules/dom-align/lib/align/align.js"],"~:js","shadow$provide.module$node_modules$dom_align$lib$align$align=function(global,process,require,module,exports,shadow$shims){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{\"default\":obj}}function flip(points,reg,map){var ret=[];_utils2[\"default\"].each(points,function(p){ret.push(p.replace(reg,function(m){return map[m]}))});return ret}function flipOffset(offset,index){offset[index]=-offset[index];return offset}function convertOffset(str,offsetLen){return(/%$/.test(str)?parseInt(str.substring(0,\nstr.length-1),10)/100*offsetLen:parseInt(str,10))||0}function normalizeOffset(offset,el){offset[0]=convertOffset(offset[0],el.width);offset[1]=convertOffset(offset[1],el.height)}Object.defineProperty(exports,\"__esModule\",{value:!0});global=require(\"module$node_modules$dom_align$lib$utils\");var _utils2=_interopRequireDefault(global);global=require(\"module$node_modules$dom_align$lib$getVisibleRectForElement\");var _getVisibleRectForElement2=_interopRequireDefault(global);global=require(\"module$node_modules$dom_align$lib$adjustForViewport\");\nvar _adjustForViewport2=_interopRequireDefault(global);global=require(\"module$node_modules$dom_align$lib$getRegion\");var _getRegion2=_interopRequireDefault(global);require=require(\"module$node_modules$dom_align$lib$getElFuturePos\");var _getElFuturePos2=_interopRequireDefault(require);exports[\"default\"]=function(el,tgtRegion,align,isTgtRegionVisible){var points=align.points,offset=align.offset||[0,0],targetOffset=align.targetOffset||[0,0],overflow=align.overflow;el=align.source||el;offset=[].concat(offset);\ntargetOffset=[].concat(targetOffset);overflow=overflow||{};var newOverflowCfg={},fail=0,visibleRect=(0,_getVisibleRectForElement2[\"default\"])(el),elRegion=(0,_getRegion2[\"default\"])(el);normalizeOffset(offset,elRegion);normalizeOffset(targetOffset,tgtRegion);var elFuturePos=(0,_getElFuturePos2[\"default\"])(elRegion,tgtRegion,points,offset,targetOffset),newElRegion=_utils2[\"default\"].merge(elRegion,elFuturePos);if(visibleRect&&(overflow.adjustX||overflow.adjustY)&&isTgtRegionVisible){if(overflow.adjustX&&\n(elFuturePos.left<visibleRect.left||elFuturePos.left+elRegion.width>visibleRect.right)){isTgtRegionVisible=flip(points,/[lr]/ig,{l:\"r\",r:\"l\"});var newOffset=flipOffset(offset,0),newTargetOffset=flipOffset(targetOffset,0),newElFuturePos=(0,_getElFuturePos2[\"default\"])(elRegion,tgtRegion,isTgtRegionVisible,newOffset,newTargetOffset);newElFuturePos.left>visibleRect.right||newElFuturePos.left+elRegion.width<visibleRect.left||(fail=1,points=isTgtRegionVisible,offset=newOffset,targetOffset=newTargetOffset)}overflow.adjustY&&\n(elFuturePos.top<visibleRect.top||elFuturePos.top+elRegion.height>visibleRect.bottom)&&(isTgtRegionVisible=flip(points,/[tb]/ig,{t:\"b\",b:\"t\"}),newOffset=flipOffset(offset,1),newTargetOffset=flipOffset(targetOffset,1),newElFuturePos=(0,_getElFuturePos2[\"default\"])(elRegion,tgtRegion,isTgtRegionVisible,newOffset,newTargetOffset),newElFuturePos.top>visibleRect.bottom||newElFuturePos.top+elRegion.height<visibleRect.top||(fail=1,points=isTgtRegionVisible,offset=newOffset,targetOffset=newTargetOffset));\nfail&&(elFuturePos=(0,_getElFuturePos2[\"default\"])(elRegion,tgtRegion,points,offset,targetOffset),_utils2[\"default\"].mix(newElRegion,elFuturePos));tgtRegion=elFuturePos.left<visibleRect.left||elFuturePos.left+elRegion.width>visibleRect.right;fail=elFuturePos.top<visibleRect.top||elFuturePos.top+elRegion.height>visibleRect.bottom;if(tgtRegion||fail)points=align.points,offset=align.offset||[0,0],targetOffset=align.targetOffset||[0,0];newOverflowCfg.adjustX=overflow.adjustX&&tgtRegion;newOverflowCfg.adjustY=\noverflow.adjustY&&fail;if(newOverflowCfg.adjustX||newOverflowCfg.adjustY)newElRegion=(0,_adjustForViewport2[\"default\"])(elFuturePos,elRegion,visibleRect,newOverflowCfg)}newElRegion.width!==elRegion.width&&_utils2[\"default\"].css(el,\"width\",_utils2[\"default\"].width(el)+newElRegion.width-elRegion.width);newElRegion.height!==elRegion.height&&_utils2[\"default\"].css(el,\"height\",_utils2[\"default\"].height(el)+newElRegion.height-elRegion.height);_utils2[\"default\"].offset(el,{left:newElRegion.left,top:newElRegion.top},\n{useCssRight:align.useCssRight,useCssBottom:align.useCssBottom,useCssTransform:align.useCssTransform,ignoreShake:align.ignoreShake});return{points:points,offset:offset,targetOffset:targetOffset,overflow:newOverflowCfg}};module.exports=exports[\"default\"]}","~:source","shadow$provide[\"module$node_modules$dom_align$lib$align$align\"] = function(global,process,require,module,exports,shadow$shims) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _utils = require('../utils');\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _getVisibleRectForElement = require('../getVisibleRectForElement');\n\nvar _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement);\n\nvar _adjustForViewport = require('../adjustForViewport');\n\nvar _adjustForViewport2 = _interopRequireDefault(_adjustForViewport);\n\nvar _getRegion = require('../getRegion');\n\nvar _getRegion2 = _interopRequireDefault(_getRegion);\n\nvar _getElFuturePos = require('../getElFuturePos');\n\nvar _getElFuturePos2 = _interopRequireDefault(_getElFuturePos);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// http://yiminghe.iteye.com/blog/1124720\n\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;\n} /**\n   * align dom node flexibly\n   * @author yiminghe@gmail.com\n   */\n\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;\n}\n\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;\n}\n\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;\n}\n\nfunction flip(points, reg, map) {\n  var ret = [];\n  _utils2['default'].each(points, function (p) {\n    ret.push(p.replace(reg, function (m) {\n      return map[m];\n    }));\n  });\n  return ret;\n}\n\nfunction flipOffset(offset, index) {\n  offset[index] = -offset[index];\n  return offset;\n}\n\nfunction convertOffset(str, offsetLen) {\n  var n = void 0;\n  if (/%$/.test(str)) {\n    n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;\n  } else {\n    n = parseInt(str, 10);\n  }\n  return n || 0;\n}\n\nfunction normalizeOffset(offset, el) {\n  offset[0] = convertOffset(offset[0], el.width);\n  offset[1] = convertOffset(offset[1], el.height);\n}\n\n/**\n * @param el\n * @param tgtRegion 参照节点所占的区域: { left, top, width, height }\n * @param align\n */\nfunction doAlign(el, tgtRegion, align, isTgtRegionVisible) {\n  var points = align.points;\n  var offset = align.offset || [0, 0];\n  var targetOffset = align.targetOffset || [0, 0];\n  var overflow = align.overflow;\n  var source = align.source || el;\n  offset = [].concat(offset);\n  targetOffset = [].concat(targetOffset);\n  overflow = overflow || {};\n  var newOverflowCfg = {};\n  var fail = 0;\n  // 当前节点可以被放置的显示区域\n  var visibleRect = (0, _getVisibleRectForElement2['default'])(source);\n  // 当前节点所占的区域, left/top/width/height\n  var elRegion = (0, _getRegion2['default'])(source);\n  // 将 offset 转换成数值，支持百分比\n  normalizeOffset(offset, elRegion);\n  normalizeOffset(targetOffset, tgtRegion);\n  // 当前节点将要被放置的位置\n  var elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset);\n  // 当前节点将要所处的区域\n  var newElRegion = _utils2['default'].merge(elRegion, elFuturePos);\n\n  // 如果可视区域不能完全放置当前节点时允许调整\n  if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {\n    if (overflow.adjustX) {\n      // 如果横向不能放下\n      if (isFailX(elFuturePos, elRegion, visibleRect)) {\n        // 对齐位置反下\n        var newPoints = flip(points, /[lr]/ig, {\n          l: 'r',\n          r: 'l'\n        });\n        // 偏移量也反下\n        var newOffset = flipOffset(offset, 0);\n        var newTargetOffset = flipOffset(targetOffset, 0);\n        var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);\n\n        if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\n          fail = 1;\n          points = newPoints;\n          offset = newOffset;\n          targetOffset = newTargetOffset;\n        }\n      }\n    }\n\n    if (overflow.adjustY) {\n      // 如果纵向不能放下\n      if (isFailY(elFuturePos, elRegion, visibleRect)) {\n        // 对齐位置反下\n        var _newPoints = flip(points, /[tb]/ig, {\n          t: 'b',\n          b: 't'\n        });\n        // 偏移量也反下\n        var _newOffset = flipOffset(offset, 1);\n        var _newTargetOffset = flipOffset(targetOffset, 1);\n        var _newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);\n\n        if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {\n          fail = 1;\n          points = _newPoints;\n          offset = _newOffset;\n          targetOffset = _newTargetOffset;\n        }\n      }\n    }\n\n    // 如果失败，重新计算当前节点将要被放置的位置\n    if (fail) {\n      elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset);\n      _utils2['default'].mix(newElRegion, elFuturePos);\n    }\n    var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);\n    var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);\n    // 检查反下后的位置是否可以放下了，如果仍然放不下：\n    // 1. 复原修改过的定位参数\n    if (isStillFailX || isStillFailY) {\n      points = align.points;\n      offset = align.offset || [0, 0];\n      targetOffset = align.targetOffset || [0, 0];\n    }\n    // 2. 只有指定了可以调整当前方向才调整\n    newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;\n    newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;\n\n    // 确实要调整，甚至可能会调整高度宽度\n    if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\n      newElRegion = (0, _adjustForViewport2['default'])(elFuturePos, elRegion, visibleRect, newOverflowCfg);\n    }\n  }\n\n  // need judge to in case set fixed with in css on height auto element\n  if (newElRegion.width !== elRegion.width) {\n    _utils2['default'].css(source, 'width', _utils2['default'].width(source) + newElRegion.width - elRegion.width);\n  }\n\n  if (newElRegion.height !== elRegion.height) {\n    _utils2['default'].css(source, 'height', _utils2['default'].height(source) + newElRegion.height - elRegion.height);\n  }\n\n  // https://github.com/kissyteam/kissy/issues/190\n  // 相对于屏幕位置没变，而 left/top 变了\n  // 例如 <div 'relative'><el absolute></div>\n  _utils2['default'].offset(source, {\n    left: newElRegion.left,\n    top: newElRegion.top\n  }, {\n    useCssRight: align.useCssRight,\n    useCssBottom: align.useCssBottom,\n    useCssTransform: align.useCssTransform,\n    ignoreShake: align.ignoreShake\n  });\n\n  return {\n    points: points,\n    offset: offset,\n    targetOffset: targetOffset,\n    overflow: newOverflowCfg\n  };\n}\n\nexports['default'] = doAlign;\n/**\n *  2012-04-26 yiminghe@gmail.com\n *   - 优化智能对齐算法\n *   - 慎用 resizeXX\n *\n *  2011-07-13 yiminghe@gmail.com note:\n *   - 增加智能对齐，以及大小调整选项\n **/\n\nmodule.exports = exports['default'];\n};","~:removed-requires",["~#set",[]],"~:actual-requires",["^5",["~$module$node_modules$dom_align$lib$adjustForViewport","~$module$node_modules$dom_align$lib$utils","~$module$node_modules$dom_align$lib$getElFuturePos","~$shadow.js","~$module$node_modules$dom_align$lib$getVisibleRectForElement","~$module$node_modules$dom_align$lib$getRegion"]],"~:properties",["^5",["top","offset","points","__esModule","ignoreShake","useCssTransform","targetOffset","adjustY","value","adjustX","t","overflow","b","r","useCssRight","l","default","left","useCssBottom"]],"~:compiled-at",1532351401807,"~:source-map-json","{\n\"version\":3,\n\"file\":\"module$node_modules$dom_align$lib$align$align.js\",\n\"lineCount\":9,\n\"mappings\":\"AAAAA,cAAA,8CAAA,CAAkE,QAAQ,CAACC,MAAD,CAAQC,OAA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AKZ,WAAAY,IAF2B,CAAlC;AAGG,CACDY,YAAanC,KAAAmC,YADZ,CAEDC,aAAcpC,KAAAoC,aAFb,CAGDC,gBAAiBrC,KAAAqC,gBAHhB,CAIDC,YAAatC,KAAAsC,YAJZ,CAHH,CAUA,OAAO,CACL7E,OAAQA,MADH,CAELW,OAAQA,MAFH,CAGL8B,aAAcA,YAHT,CAILC,SAAUG,cAJL,CAnHkD,CAqI3DpD,OAAAC,QAAA,CAAiBA,OAAA,CAAQ,SAAR,CA1N8G;\",\n\"sources\":[\"node_modules/dom-align/lib/align/align.js\"],\n\"sourcesContent\":[\"shadow$provide[\\\"module$node_modules$dom_align$lib$align$align\\\"] = function(global,process,require,module,exports,shadow$shims) {\\n'use strict';\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\n\\nvar _utils = require('../utils');\\n\\nvar _utils2 = _interopRequireDefault(_utils);\\n\\nvar _getVisibleRectForElement = require('../getVisibleRectForElement');\\n\\nvar _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement);\\n\\nvar _adjustForViewport = require('../adjustForViewport');\\n\\nvar _adjustForViewport2 = _interopRequireDefault(_adjustForViewport);\\n\\nvar _getRegion = require('../getRegion');\\n\\nvar _getRegion2 = _interopRequireDefault(_getRegion);\\n\\nvar _getElFuturePos = require('../getElFuturePos');\\n\\nvar _getElFuturePos2 = _interopRequireDefault(_getElFuturePos);\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\\n\\n// http://yiminghe.iteye.com/blog/1124720\\n\\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\\n  return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;\\n} /**\\n   * align dom node flexibly\\n   * @author yiminghe@gmail.com\\n   */\\n\\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\\n  return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;\\n}\\n\\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\\n  return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;\\n}\\n\\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\\n  return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;\\n}\\n\\nfunction flip(points, reg, map) {\\n  var ret = [];\\n  _utils2['default'].each(points, function (p) {\\n    ret.push(p.replace(reg, function (m) {\\n      return map[m];\\n    }));\\n  });\\n  return ret;\\n}\\n\\nfunction flipOffset(offset, index) {\\n  offset[index] = -offset[index];\\n  return offset;\\n}\\n\\nfunction convertOffset(str, offsetLen) {\\n  var n = void 0;\\n  if (/%$/.test(str)) {\\n    n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;\\n  } else {\\n    n = parseInt(str, 10);\\n  }\\n  return n || 0;\\n}\\n\\nfunction normalizeOffset(offset, el) {\\n  offset[0] = convertOffset(offset[0], el.width);\\n  offset[1] = convertOffset(offset[1], el.height);\\n}\\n\\n/**\\n * @param el\\n * @param tgtRegion \\u53c2\\u7167\\u8282\\u70b9\\u6240\\u5360\\u7684\\u533a\\u57df: { left, top, width, height }\\n * @param align\\n */\\nfunction doAlign(el, tgtRegion, align, isTgtRegionVisible) {\\n  var points = align.points;\\n  var offset = align.offset || [0, 0];\\n  var targetOffset = align.targetOffset || [0, 0];\\n  var overflow = align.overflow;\\n  var source = align.source || el;\\n  offset = [].concat(offset);\\n  targetOffset = [].concat(targetOffset);\\n  overflow = overflow || {};\\n  var newOverflowCfg = {};\\n  var fail = 0;\\n  // \\u5f53\\u524d\\u8282\\u70b9\\u53ef\\u4ee5\\u88ab\\u653e\\u7f6e\\u7684\\u663e\\u793a\\u533a\\u57df\\n  var visibleRect = (0, _getVisibleRectForElement2['default'])(source);\\n  // \\u5f53\\u524d\\u8282\\u70b9\\u6240\\u5360\\u7684\\u533a\\u57df, left/top/width/height\\n  var elRegion = (0, _getRegion2['default'])(source);\\n  // \\u5c06 offset \\u8f6c\\u6362\\u6210\\u6570\\u503c\\uff0c\\u652f\\u6301\\u767e\\u5206\\u6bd4\\n  normalizeOffset(offset, elRegion);\\n  normalizeOffset(targetOffset, tgtRegion);\\n  // \\u5f53\\u524d\\u8282\\u70b9\\u5c06\\u8981\\u88ab\\u653e\\u7f6e\\u7684\\u4f4d\\u7f6e\\n  var elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset);\\n  // \\u5f53\\u524d\\u8282\\u70b9\\u5c06\\u8981\\u6240\\u5904\\u7684\\u533a\\u57df\\n  var newElRegion = _utils2['default'].merge(elRegion, elFuturePos);\\n\\n  // \\u5982\\u679c\\u53ef\\u89c6\\u533a\\u57df\\u4e0d\\u80fd\\u5b8c\\u5168\\u653e\\u7f6e\\u5f53\\u524d\\u8282\\u70b9\\u65f6\\u5141\\u8bb8\\u8c03\\u6574\\n  if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {\\n    if (overflow.adjustX) {\\n      // \\u5982\\u679c\\u6a2a\\u5411\\u4e0d\\u80fd\\u653e\\u4e0b\\n      if (isFailX(elFuturePos, elRegion, visibleRect)) {\\n        // \\u5bf9\\u9f50\\u4f4d\\u7f6e\\u53cd\\u4e0b\\n        var newPoints = flip(points, /[lr]/ig, {\\n          l: 'r',\\n          r: 'l'\\n        });\\n        // \\u504f\\u79fb\\u91cf\\u4e5f\\u53cd\\u4e0b\\n        var newOffset = flipOffset(offset, 0);\\n        var newTargetOffset = flipOffset(targetOffset, 0);\\n        var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);\\n\\n        if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\\n          fail = 1;\\n          points = newPoints;\\n          offset = newOffset;\\n          targetOffset = newTargetOffset;\\n        }\\n      }\\n    }\\n\\n    if (overflow.adjustY) {\\n      // \\u5982\\u679c\\u7eb5\\u5411\\u4e0d\\u80fd\\u653e\\u4e0b\\n      if (isFailY(elFuturePos, elRegion, visibleRect)) {\\n        // \\u5bf9\\u9f50\\u4f4d\\u7f6e\\u53cd\\u4e0b\\n        var _newPoints = flip(points, /[tb]/ig, {\\n          t: 'b',\\n          b: 't'\\n        });\\n        // \\u504f\\u79fb\\u91cf\\u4e5f\\u53cd\\u4e0b\\n        var _newOffset = flipOffset(offset, 1);\\n        var _newTargetOffset = flipOffset(targetOffset, 1);\\n        var _newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);\\n\\n        if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {\\n          fail = 1;\\n          points = _newPoints;\\n          offset = _newOffset;\\n          targetOffset = _newTargetOffset;\\n        }\\n      }\\n    }\\n\\n    // \\u5982\\u679c\\u5931\\u8d25\\uff0c\\u91cd\\u65b0\\u8ba1\\u7b97\\u5f53\\u524d\\u8282\\u70b9\\u5c06\\u8981\\u88ab\\u653e\\u7f6e\\u7684\\u4f4d\\u7f6e\\n    if (fail) {\\n      elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset);\\n      _utils2['default'].mix(newElRegion, elFuturePos);\\n    }\\n    var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);\\n    var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);\\n    // \\u68c0\\u67e5\\u53cd\\u4e0b\\u540e\\u7684\\u4f4d\\u7f6e\\u662f\\u5426\\u53ef\\u4ee5\\u653e\\u4e0b\\u4e86\\uff0c\\u5982\\u679c\\u4ecd\\u7136\\u653e\\u4e0d\\u4e0b\\uff1a\\n    // 1. \\u590d\\u539f\\u4fee\\u6539\\u8fc7\\u7684\\u5b9a\\u4f4d\\u53c2\\u6570\\n    if (isStillFailX || isStillFailY) {\\n      points = align.points;\\n      offset = align.offset || [0, 0];\\n      targetOffset = align.targetOffset || [0, 0];\\n    }\\n    // 2. \\u53ea\\u6709\\u6307\\u5b9a\\u4e86\\u53ef\\u4ee5\\u8c03\\u6574\\u5f53\\u524d\\u65b9\\u5411\\u624d\\u8c03\\u6574\\n    newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;\\n    newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;\\n\\n    // \\u786e\\u5b9e\\u8981\\u8c03\\u6574\\uff0c\\u751a\\u81f3\\u53ef\\u80fd\\u4f1a\\u8c03\\u6574\\u9ad8\\u5ea6\\u5bbd\\u5ea6\\n    if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\\n      newElRegion = (0, _adjustForViewport2['default'])(elFuturePos, elRegion, visibleRect, newOverflowCfg);\\n    }\\n  }\\n\\n  // need judge to in case set fixed with in css on height auto element\\n  if (newElRegion.width !== elRegion.width) {\\n    _utils2['default'].css(source, 'width', _utils2['default'].width(source) + newElRegion.width - elRegion.width);\\n  }\\n\\n  if (newElRegion.height !== elRegion.height) {\\n    _utils2['default'].css(source, 'height', _utils2['default'].height(source) + newElRegion.height - elRegion.height);\\n  }\\n\\n  // https://github.com/kissyteam/kissy/issues/190\\n  // \\u76f8\\u5bf9\\u4e8e\\u5c4f\\u5e55\\u4f4d\\u7f6e\\u6ca1\\u53d8\\uff0c\\u800c left/top \\u53d8\\u4e86\\n  // \\u4f8b\\u5982 <div 'relative'><el absolute></div>\\n  _utils2['default'].offset(source, {\\n    left: newElRegion.left,\\n    top: newElRegion.top\\n  }, {\\n    useCssRight: align.useCssRight,\\n    useCssBottom: align.useCssBottom,\\n    useCssTransform: align.useCssTransform,\\n    ignoreShake: align.ignoreShake\\n  });\\n\\n  return {\\n    points: points,\\n    offset: offset,\\n    targetOffset: targetOffset,\\n    overflow: newOverflowCfg\\n  };\\n}\\n\\nexports['default'] = doAlign;\\n/**\\n *  2012-04-26 yiminghe@gmail.com\\n *   - \\u4f18\\u5316\\u667a\\u80fd\\u5bf9\\u9f50\\u7b97\\u6cd5\\n *   - \\u614e\\u7528 resizeXX\\n *\\n *  2011-07-13 yiminghe@gmail.com note:\\n *   - \\u589e\\u52a0\\u667a\\u80fd\\u5bf9\\u9f50\\uff0c\\u4ee5\\u53ca\\u5927\\u5c0f\\u8c03\\u6574\\u9009\\u9879\\n **/\\n\\nmodule.exports = exports['default'];\\n};\"],\n\"names\":[\"shadow$provide\",\"global\",\"process\",\"require\",\"module\",\"exports\",\"shadow$shims\",\"_interopRequireDefault\",\"obj\",\"__esModule\",\"flip\",\"points\",\"reg\",\"map\",\"ret\",\"_utils2\",\"each\",\"p\",\"push\",\"replace\",\"m\",\"flipOffset\",\"offset\",\"index\",\"convertOffset\",\"str\",\"offsetLen\",\"test\",\"n\",\"parseInt\",\"substring\",\"length\",\"normalizeOffset\",\"el\",\"width\",\"height\",\"Object\",\"defineProperty\",\"value\",\"_utils\",\"_getVisibleRectForElement\",\"_getVisibleRectForElement2\",\"_adjustForViewport\",\"_adjustForViewport2\",\"_getRegion\",\"_getRegion2\",\"_getElFuturePos\",\"_getElFuturePos2\",\"doAlign\",\"tgtRegion\",\"align\",\"isTgtRegionVisible\",\"targetOffset\",\"overflow\",\"source\",\"concat\",\"newOverflowCfg\",\"fail\",\"visibleRect\",\"elRegion\",\"elFuturePos\",\"newElRegion\",\"merge\",\"adjustX\",\"adjustY\",\"left\",\"right\",\"newPoints\",\"l\",\"r\",\"newOffset\",\"newTargetOffset\",\"newElFuturePos\",\"top\",\"bottom\",\"_newPoints\",\"t\",\"b\",\"_newOffset\",\"_newTargetOffset\",\"_newElFuturePos\",\"mix\",\"isStillFailX\",\"isStillFailY\",\"css\",\"useCssRight\",\"useCssBottom\",\"useCssTransform\",\"ignoreShake\"]\n}\n"]